You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
20 lines
408 B
JavaScript
20 lines
408 B
JavaScript
import { createClient } from '@node-redis/client-local';
|
|
|
|
const client = createClient();
|
|
|
|
export function setup() {
|
|
return client.connect();
|
|
}
|
|
|
|
export function benchmark({ randomString }) {
|
|
return Promise.all([
|
|
client.set(randomString, randomString),
|
|
client.get(randomString),
|
|
client.del(randomString)
|
|
]);
|
|
}
|
|
|
|
export function teardown() {
|
|
return client.disconnect();
|
|
}
|