1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00
This commit is contained in:
Leibale
2023-04-23 07:56:15 -04:00
parent 35d32e5b64
commit 9faa3e77c4
326 changed files with 14620 additions and 10931 deletions

View File

@@ -0,0 +1,20 @@
import Redis from 'ioredis';
export default async (host) => {
const client = new Redis({
host,
lazyConnect: true,
enableAutoPipelining: true
});
await client.connect();
return {
benchmark() {
return client.ping();
},
teardown() {
return client.disconnect();
}
}
};

View File

@@ -0,0 +1,21 @@
import { createClient } from 'redis-local';
export default async (host) => {
const client = createClient({
socket: {
host
},
RESP: 2
});
await client.connect();
return {
benchmark() {
return client.ping();
},
teardown() {
return client.disconnect();
}
};
};

View File

@@ -0,0 +1,27 @@
import { createClient } from 'redis-local';
import PING from 'redis-local/dist/lib/commands/PING.js';
export default async (host) => {
const client = createClient({
socket: {
host
},
RESP: 3,
modules: {
module: {
ping: PING.default
}
}
});
await client.connect();
return {
benchmark() {
return client.withFlags({}).module.ping();
},
teardown() {
return client.disconnect();
}
};
};

View File

@@ -0,0 +1,27 @@
import { createClient } from 'redis-local';
import PING from 'redis-local/dist/lib/commands/PING.js';
export default async (host) => {
const client = createClient({
socket: {
host
},
RESP: 3,
modules: {
module: {
ping: PING.default
}
}
});
await client.connect();
return {
benchmark() {
return client.module.ping();
},
teardown() {
return client.disconnect();
}
};
};

View File

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

View File

@@ -1,4 +1,4 @@
import { createClient } from '@redis/client';
import { createClient } from 'redis-v4';
export default async (host) => {
const client = createClient({