You've already forked node-redis
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:
19
benchmark/lib/set-get-delete-string/ioredis.js
Normal file
19
benchmark/lib/set-get-delete-string/ioredis.js
Normal 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();
|
||||
}
|
Reference in New Issue
Block a user