1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00
Files
node-redis/benchmark/lib/set-get-delete-string/v4.js
2021-12-07 11:01:42 -05:00

21 lines
491 B
JavaScript

import { createClient } from '@node-redis/client';
export default async (host, { randomString }) => {
const client = createClient({ host });
await client.connect();
return {
benchmark() {
return Promise.all([
client.set(randomString, randomString),
client.get(randomString),
client.del(randomString)
]);
},
teardown() {
return client.disconnect();
}
};
};