Skip to content

Commit 9117041

Browse files
Merge pull request #29 from htemelski/master
Updated node-redis benchmark to use node-redis 4.7.1
2 parents e817c48 + d7a379b commit 9117041

20 files changed

+2911
-464
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ pubsub-sub-bench
8383
ehthumbs.db
8484
Thumbs.db
8585

86-
package-lock.json
8786

8887
# Coverage Results #
8988
####################
@@ -92,3 +91,4 @@ coverage.txt
9291
# Profiler Results #
9392
####################
9493
*.pprof
94+
/out/*

js/ioredis/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ yarn-error.log*
99
*.out
1010
*.tmp
1111
*.pid
12-
*.json
1312

1413
# OS junk
1514
.DS_Store

js/ioredis/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# pubsub-sub-bench (JavaScript Edition)
1+
# pubsub-sub-bench (ioredis Edition)
22

33
High-performance **Redis Pub/Sub benchmark tool**, written in Node.js.
44
Supports both **standalone** and **Redis OSS Cluster** modes, with support for `PUBLISH`, `SPUBLISH`, `SUBSCRIBE`, and `SSUBSCRIBE`.
@@ -10,5 +10,14 @@ Supports both **standalone** and **Redis OSS Cluster** modes, with support for `
1010
## 📦 Installation
1111

1212
```bash
13-
cd pubsub-sub-bench/js/ioredis
14-
npm install
13+
npm install
14+
```
15+
16+
## Usage
17+
18+
This version of the benchmark accepts the same arguments as the original go version
19+
There's a script that can be utilizaed to start multiple instances of the benchmark
20+
21+
Usage: ./run-multi-bench.sh <instances> [benchmark_args...]
22+
23+
Example: ./run-multi-bench.sh 3 --mode=publish --clients=100 --test-time=60

js/ioredis/lib/redisManager.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,6 @@ async function runBenchmark(argv) {
211211
console.log(`Reconnect interval for ${subscriberName}: ${reconnectInterval}ms`);
212212
}
213213

214-
if (clientId % 100 === 0 || clientId === argv.clients) {
215-
console.log(`${subscriberName} subscribing to ${channels.length} channels.`);
216-
}
217-
218214
promises.push(
219215
subscriberRoutine(
220216
subscriberName,

js/ioredis/lib/subscriber.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
function safeBigIntUs() {
2-
return Date.now();
3-
}
4-
51
async function subscriberRoutine(
62
clientName,
73
mode,

0 commit comments

Comments
 (0)