NodeRedis/node-redis

View on GitHub
benchmark/lib/ping/local-resp3-module.js

Summary

Maintainability
A
40 mins
Test Coverage
import { createClient } from 'redis-local';
import PING from 'redis-local/dist/lib/commands/PING.js';

export default async (host) => {
  const client = createClient({
    socket: {
      host
    },
    RESP: 3,
    modules: {
      module: {
        ping: PING.default
      }
    }
  });

  await client.connect();

  return {
    benchmark() {
      return client.module.ping();
    },
    teardown() {
      return client.disconnect();
    }
  };
};