1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-03 04:01:40 +03:00
Files
2021-12-07 11:07:31 -05:00

25 lines
535 B
JavaScript

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