1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00
Files
node-redis/benchmark/lib/ping/local-resp3-module-with-flags.js

28 lines
475 B
JavaScript

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.withTypeMapping({}).module.ping();
},
teardown() {
return client.disconnect();
}
};
};