NodeRedis/node-redis

View on GitHub
benchmark/lib/ping/local-resp2.js

Summary

Maintainability
A
2 hrs
Test Coverage
import { createClient } from 'redis-local';

export default async (host) => {
  const client = createClient({
    socket: {
      host
    },
    RESP: 2
  });

  await client.connect();

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