1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00
This commit is contained in:
Leibale
2023-07-18 16:32:45 -04:00
parent 8501db0243
commit fdd1978d92
43 changed files with 377 additions and 506 deletions

View File

@@ -0,0 +1,23 @@
import { createClient, RESP_TYPES } from 'redis-local';
export default async (host) => {
const client = createClient({
socket: {
host
},
RESP: 3
}).withTypeMapping({
[RESP_TYPES.SIMPLE_STRING]: Buffer
});
await client.connect();
return {
benchmark() {
return client.ping();
},
teardown() {
return client.disconnect();
}
};
};

View File

@@ -0,0 +1,24 @@
import { createClient, RESP_TYPES } from 'redis-local';
export default async (host) => {
const client = createClient({
socket: {
host
},
commandOptions: {
[RESP_TYPES.SIMPLE_STRING]: Buffer
},
RESP: 3
});
await client.connect();
return {
benchmark() {
return client.ping();
},
teardown() {
return client.disconnect();
}
};
};