Skip to content

Commit

Permalink
V5 branch (#2491)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
leibale and Simon Prickett committed Apr 30, 2023
1 parent 3273c85 commit b4bb68d
Show file tree
Hide file tree
Showing 540 changed files with 20,416 additions and 17,721 deletions.
File renamed without changes.
6 changes: 2 additions & 4 deletions .github/workflows/documentation.yml
Expand Up @@ -10,15 +10,13 @@ jobs:
documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Use Node.js
uses: actions/setup-node@v2.3.0
uses: actions/setup-node@v3
- name: Install Packages
run: npm ci
- name: Build tests tools
run: npm run build:tests-tools
- name: Generate Documentation
run: npm run documentation
- name: Upload
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Expand Up @@ -16,14 +16,14 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: ['14', '16', '18', '19']
redis-version: ['5', '6.0', '6.2', '7.0']
node-version: ['16', '18', '19', '20']
redis-version: ['5', '6.0', '6.2', '7.0', '7.2-rc']
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.3.0
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Update npm
Expand All @@ -32,7 +32,7 @@ jobs:
- name: Install Packages
run: npm ci
- name: Build tests tools
run: npm run build:tests-tools
run: npm run build:client && npm run build:test-utils
- name: Run Tests
run: npm run test -- -- --forbid-only --redis-version=${{ matrix.redis-version }}
- name: Upload to Codecov
Expand Down
340 changes: 2 additions & 338 deletions README.md

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions benchmark/lib/ping/ioredis-auto-pipeline.js
@@ -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();
}
}
};
21 changes: 21 additions & 0 deletions benchmark/lib/ping/local-resp2.js
@@ -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();
}
};
};
27 changes: 27 additions & 0 deletions benchmark/lib/ping/local-resp3-module-with-flags.js
@@ -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();
}
};
};
27 changes: 27 additions & 0 deletions benchmark/lib/ping/local-resp3-module.js
@@ -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();
}
};
};
21 changes: 21 additions & 0 deletions benchmark/lib/ping/local-resp3.js
@@ -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();
}
};
};
2 changes: 1 addition & 1 deletion benchmark/lib/ping/v4.js
@@ -1,4 +1,4 @@
import { createClient } from '@redis/client';
import { createClient } from 'redis-v4';

export default async (host) => {
const client = createClient({
Expand Down
12 changes: 6 additions & 6 deletions benchmark/lib/runner.js
Expand Up @@ -71,13 +71,13 @@ const benchmarkStart = process.hrtime.bigint(),
histogram = await run(times),
benchmarkNanoseconds = process.hrtime.bigint() - benchmarkStart,
json = {
timestamp,
// timestamp,
operationsPerSecond: times / Number(benchmarkNanoseconds) * 1_000_000_000,
p0: histogram.getValueAtPercentile(0),
p50: histogram.getValueAtPercentile(50),
p95: histogram.getValueAtPercentile(95),
p99: histogram.getValueAtPercentile(99),
p100: histogram.getValueAtPercentile(100)
// p0: histogram.getValueAtPercentile(0),
// p50: histogram.getValueAtPercentile(50),
// p95: histogram.getValueAtPercentile(95),
// p99: histogram.getValueAtPercentile(99),
// p100: histogram.getValueAtPercentile(100)
};
console.log(`[${basename(path)}]:`);
console.table(json);
Expand Down

0 comments on commit b4bb68d

Please sign in to comment.