1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

improve encodeCommand performance, add set-get-delete-string benchmark

This commit is contained in:
leibale
2021-12-01 20:17:52 -05:00
parent cba0289ff7
commit f55de0efbf
10 changed files with 916 additions and 8 deletions

View File

@@ -0,0 +1,19 @@
import Redis from 'ioredis';
const client = new Redis({ lazyConnect: true });
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();
}