Skip to content

Commit

Permalink
Bump deps and fixed tests (#479)
Browse files Browse the repository at this point in the history
* bump deps

+ mqtt@4.0.0
+ mqemitter@4.2.0
+ release-it@13.5.7
+ @types/node@13.13.4
+ @typescript-eslint/parser@2.30.0
+ @typescript-eslint/eslint-plugin@2.30.0

* fixed tests broken by mqtt@4.0.0

* fix dup ci test when pushing to branch and creating a pr

* docs: Updated benchmarks with clusters

* fixed typo
  • Loading branch information
robertsLando committed Apr 29, 2020
1 parent 49276ec commit 5fc092c
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 11 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: ci

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

jobs:
test:
Expand Down
79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Barebone MQTT server that can run on any stream servers
- [Acknowledgements](#acknowledgements)
- [Mosca vs Aedes](#mosca-vs-aedes)
- [Benchmark: Aedes](#benchmark-aedes)
- [In memory - No clusters](#in-memory---no-clusters)
- [Redis Persistence and Redis Emitter - With Clusters](#redis-persistence-and-redis-emitter---with-clusters)
- [Mongo Persistence and Redis Emitter - With Clusters](#mongo-persistence-and-redis-emitter---with-clusters)
- [Redis Persistence and Mongodb Emitter - With Clusters](#redis-persistence-and-mongodb-emitter---with-clusters)
- [Benchmark: Mosca](#benchmark-mosca)
- [Made with Aedes](#made-with-aedes)
- [Collaborators](#collaborators)
Expand Down Expand Up @@ -118,8 +122,38 @@ Example benchmark test with 1000 clients sending 5000 QoS 1 messsages. Used
mqtt-benchmark --broker tcp://localhost:1883 --clients 1000 --qos 1 --count 5000
```

CPU INFO:

```sh
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 94
Model name: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Stepping: 3
CPU MHz: 800.014
CPU max MHz: 3500,0000
CPU min MHz: 800,0000
BogoMIPS: 5199.98
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 6144K
```

### Benchmark: Aedes

#### In memory - No clusters

```sh
========= TOTAL (1000) =========
Total Ratio: 1.000 (5000000/5000000)
Expand All @@ -133,6 +167,51 @@ Average Bandwidth (msg/sec): 28.115
Total Bandwidth (msg/sec): 28114.678
```

#### Redis Persistence and Redis Emitter - With Clusters

```sh
========= TOTAL (1000) =========
Total Ratio: 1.000 (5000000/5000000)
Total Runtime (sec): 114.404
Average Runtime (sec): 109.022
Msg time min (ms): 0.065
Msg time max (ms): 393.214
Msg time mean mean (ms): 21.520
Msg time mean std (ms): 0.595
Average Bandwidth (msg/sec): 45.896
Total Bandwidth (msg/sec): 45896.306
```

#### Mongo Persistence and Redis Emitter - With Clusters

```sh
========= TOTAL (1000) =========
Total Ratio: 1.000 (5000000/5000000)
Total Runtime (sec): 112.769
Average Runtime (sec): 105.524
Msg time min (ms): 0.062
Msg time max (ms): 329.062
Msg time mean mean (ms): 20.750
Msg time mean std (ms): 0.878
Average Bandwidth (msg/sec): 47.464
Total Bandwidth (msg/sec): 47464.271
```

### Redis Persistence and Mongodb Emitter - With Clusters

```sh
========= TOTAL (1000) =========
Total Ratio: 1.000 (5000000/5000000)
Total Runtime (sec): 118.587
Average Runtime (sec): 114.190
Msg time min (ms): 0.080
Msg time max (ms): 324.028
Msg time mean mean (ms): 22.558
Msg time mean std (ms): 0.730
Average Bandwidth (msg/sec): 43.832
Total Bandwidth (msg/sec): 43831.927
```

### Benchmark: [Mosca](http://www.npmjs.com/mosca)

```sh
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@
"license": "MIT",
"devDependencies": {
"@sinonjs/fake-timers": "^6.0.1",
"@types/node": "^13.13.2",
"@typescript-eslint/eslint-plugin": "^2.29.0",
"@typescript-eslint/parser": "^2.29.0",
"@types/node": "^13.13.4",
"@typescript-eslint/eslint-plugin": "^2.30.0",
"@typescript-eslint/parser": "^2.30.0",
"concat-stream": "^2.0.0",
"duplexify": "^4.1.1",
"license-checker": "^25.0.1",
"markdownlint-cli": "^0.22.0",
"mqtt": "^3.0.0",
"mqtt": "^4.0.0",
"mqtt-connection": "^4.0.0",
"pre-commit": "^1.2.2",
"release-it": "^13.5.5",
"release-it": "^13.5.7",
"snazzy": "^8.0.0",
"standard": "^14.3.3",
"tap": "^14.10.7",
Expand All @@ -113,7 +113,7 @@
"fastfall": "^1.5.1",
"fastparallel": "^2.3.0",
"fastseries": "^2.0.0",
"mqemitter": "^4.1.2",
"mqemitter": "^4.2.0",
"mqtt-packet": "^6.3.2",
"proxy-protocol-js": "^4.0.4",
"readable-stream": "^3.6.0",
Expand Down
12 changes: 8 additions & 4 deletions test/not-blocking.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ test('do not block after a subscription', function (t) {
port: port,
keepalive: 0
}).on('error', function (err) {
clock.clearTimeout(clockId)
t.fail(err)
if (err.code !== 'ECONNRESET') {
clock.clearTimeout(clockId)
t.fail(err)
}
})

subscriber.subscribe('test', publish)
Expand Down Expand Up @@ -172,8 +174,10 @@ test('do not block with overlapping subscription', function (t) {
port: port,
keepalive: 0
}).on('error', function (err) {
clock.clearTimeout(clockId)
t.fail(err)
if (err.code !== 'ECONNRESET') {
clock.clearTimeout(clockId)
t.fail(err)
}
})

subscriber.subscribe('#', function () {
Expand Down

0 comments on commit 5fc092c

Please sign in to comment.