Skip to content

Commit b4bb68d

Browse files
leibaleSimon Prickett
and
Simon Prickett
authored
V5 branch (#2491)
* wip * Worked on phrasing etc for v5 doc changes. * Removed quite repetition of 'Rather' * Update v4-to-v5.md * Update v4-to-v5.md * Update v4-to-v5.md * WIP * WIP * clean SET command * some more commands, multi.exec<'typed'> * "typed" multi * WIP * upgrade deps * wip * wip * fix #2469 * wip * npm update * wip * wip * wip * wip * some tests * tests.yml * wip * wip * merge master into v5 * some more commands * some more commands * WIP * Release client@2.0.0-next.1 --------- Co-authored-by: Simon Prickett <simon@redislabs.com>
1 parent 3273c85 commit b4bb68d

File tree

540 files changed

+20416
-17721
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

540 files changed

+20416
-17721
lines changed
File renamed without changes.

.github/workflows/documentation.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ jobs:
1010
documentation:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2.3.4
13+
- uses: actions/checkout@v3
1414
with:
1515
fetch-depth: 1
1616
- name: Use Node.js
17-
uses: actions/setup-node@v2.3.0
17+
uses: actions/setup-node@v3
1818
- name: Install Packages
1919
run: npm ci
20-
- name: Build tests tools
21-
run: npm run build:tests-tools
2220
- name: Generate Documentation
2321
run: npm run documentation
2422
- name: Upload

.github/workflows/tests.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
node-version: ['14', '16', '18', '19']
20-
redis-version: ['5', '6.0', '6.2', '7.0']
19+
node-version: ['16', '18', '19', '20']
20+
redis-version: ['5', '6.0', '6.2', '7.0', '7.2-rc']
2121
steps:
22-
- uses: actions/checkout@v2.3.4
22+
- uses: actions/checkout@v3
2323
with:
2424
fetch-depth: 1
2525
- name: Use Node.js ${{ matrix.node-version }}
26-
uses: actions/setup-node@v2.3.0
26+
uses: actions/setup-node@v3
2727
with:
2828
node-version: ${{ matrix.node-version }}
2929
- name: Update npm
@@ -32,7 +32,7 @@ jobs:
3232
- name: Install Packages
3333
run: npm ci
3434
- name: Build tests tools
35-
run: npm run build:tests-tools
35+
run: npm run build:client && npm run build:test-utils
3636
- name: Run Tests
3737
run: npm run test -- -- --forbid-only --redis-version=${{ matrix.redis-version }}
3838
- name: Upload to Codecov

README.md

+2-338
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import Redis from 'ioredis';
2+
3+
export default async (host) => {
4+
const client = new Redis({
5+
host,
6+
lazyConnect: true,
7+
enableAutoPipelining: true
8+
});
9+
10+
await client.connect();
11+
12+
return {
13+
benchmark() {
14+
return client.ping();
15+
},
16+
teardown() {
17+
return client.disconnect();
18+
}
19+
}
20+
};

benchmark/lib/ping/local-resp2.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { createClient } from 'redis-local';
2+
3+
export default async (host) => {
4+
const client = createClient({
5+
socket: {
6+
host
7+
},
8+
RESP: 2
9+
});
10+
11+
await client.connect();
12+
13+
return {
14+
benchmark() {
15+
return client.ping();
16+
},
17+
teardown() {
18+
return client.disconnect();
19+
}
20+
};
21+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { createClient } from 'redis-local';
2+
import PING from 'redis-local/dist/lib/commands/PING.js';
3+
4+
export default async (host) => {
5+
const client = createClient({
6+
socket: {
7+
host
8+
},
9+
RESP: 3,
10+
modules: {
11+
module: {
12+
ping: PING.default
13+
}
14+
}
15+
});
16+
17+
await client.connect();
18+
19+
return {
20+
benchmark() {
21+
return client.withFlags({}).module.ping();
22+
},
23+
teardown() {
24+
return client.disconnect();
25+
}
26+
};
27+
};
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { createClient } from 'redis-local';
2+
import PING from 'redis-local/dist/lib/commands/PING.js';
3+
4+
export default async (host) => {
5+
const client = createClient({
6+
socket: {
7+
host
8+
},
9+
RESP: 3,
10+
modules: {
11+
module: {
12+
ping: PING.default
13+
}
14+
}
15+
});
16+
17+
await client.connect();
18+
19+
return {
20+
benchmark() {
21+
return client.module.ping();
22+
},
23+
teardown() {
24+
return client.disconnect();
25+
}
26+
};
27+
};

benchmark/lib/ping/local-resp3.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { createClient } from 'redis-local';
2+
3+
export default async (host) => {
4+
const client = createClient({
5+
socket: {
6+
host
7+
},
8+
RESP: 3
9+
});
10+
11+
await client.connect();
12+
13+
return {
14+
benchmark() {
15+
return client.ping();
16+
},
17+
teardown() {
18+
return client.disconnect();
19+
}
20+
};
21+
};

benchmark/lib/ping/v4.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createClient } from '@redis/client';
1+
import { createClient } from 'redis-v4';
22

33
export default async (host) => {
44
const client = createClient({

benchmark/lib/runner.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ const benchmarkStart = process.hrtime.bigint(),
7171
histogram = await run(times),
7272
benchmarkNanoseconds = process.hrtime.bigint() - benchmarkStart,
7373
json = {
74-
timestamp,
74+
// timestamp,
7575
operationsPerSecond: times / Number(benchmarkNanoseconds) * 1_000_000_000,
76-
p0: histogram.getValueAtPercentile(0),
77-
p50: histogram.getValueAtPercentile(50),
78-
p95: histogram.getValueAtPercentile(95),
79-
p99: histogram.getValueAtPercentile(99),
80-
p100: histogram.getValueAtPercentile(100)
76+
// p0: histogram.getValueAtPercentile(0),
77+
// p50: histogram.getValueAtPercentile(50),
78+
// p95: histogram.getValueAtPercentile(95),
79+
// p99: histogram.getValueAtPercentile(99),
80+
// p100: histogram.getValueAtPercentile(100)
8181
};
8282
console.log(`[${basename(path)}]:`);
8383
console.table(json);

0 commit comments

Comments
 (0)