hemerajs / microservice-benchmark

Simple benchmark for microservice frameworks in Node.Js which support NATS as transport.
MIT License
0 stars 0 forks source link

Different result #1

Closed icebob closed 6 years ago

icebob commented 6 years ago

Hi Dustin, I tried your benchmark, but I got different results as your.

d:\Work\tmp\microservice-benchmark>npm run simple

> microservice-benchmark@0.0.0 simple d:\Work\tmp\microservice-benchmark
> node ./simple

Platform info:
==============
   Windows_NT 6.1.7601 x64
   Node.JS: 6.10.0
   V8: 5.1.281.93
   Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz × 8
==============
Wait 1 second and send 2x 1000 msg
==============
(node:11784) DeprecationWarning: 'root' is deprecated, use 'global'
["listen","subscribe","seneca_any_act"]
{"kind":"notice","notice":"hello seneca n6wj5nra38k9/1507145896393/11784/3.3.0/-","level":"info","when":1507145896447}
["client","subscribe","seneca_any_res"]
{"kind":"notice","notice":"hello seneca 4csh58ajrlf7/1507145895844/11784/3.3.0/-","level":"info","when":1507145896449}
["listen","open",{"type":"nats","role":"transport","hook":"listen","reconnect":true,"maxReconnectAttempts":9999,"reconnectTimeWait":1000}]
["client","open",{"type":"nats","pg":"","id":"pg:,type:nats","role":"transport","hook":"client","reconnect":true,"maxReconnectAttempts":9999,"reconnectTimeWait":1000}]
benchSenecaNats*1000: 660.685ms
benchHemera*1000: 305.955ms
benchMoleculerNats*1000: 174.113ms
benchSenecaNats*1000: 466.322ms
benchHemera*1000: 238.499ms
benchMoleculerNats*1000: 152.751ms
StarpTech commented 6 years ago

Please rerun with Node.JS 8.4 I will try 6.10.0

icebob commented 6 years ago

Ohh, sorry.

The results with 8.4.0:

Platform info:
==============
   Windows_NT 6.1.7601 x64
   Node.JS: 8.4.0
   V8: 6.0.286.52
   Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz × 8
==============
Wait 1 second and send 2x 1000 msg
==============
(node:12836) [DEP0016] DeprecationWarning: 'root' is deprecated, use 'global'
["listen","subscribe","seneca_any_act"]
{"kind":"notice","notice":"hello seneca hx9qerc927sj/1507146385922/12836/3.3.0/-","level":"info","when":1507146385957}
["client","subscribe","seneca_any_res"]
{"kind":"notice","notice":"hello seneca f9bjuqst7g6e/1507146385818/12836/3.3.0/-","level":"info","when":1507146385961}
["listen","open",{"type":"nats","role":"transport","hook":"listen","reconnect":true,"maxReconnectAttempts":9999,"reconnectTimeWait":1000}]
["client","open",{"type":"nats","pg":"","id":"pg:,type:nats","role":"transport","hook":"client","reconnect":true,"maxReconnectAttempts":9999,"reconnectTimeWait":1000}]
benchSenecaNats*1000: 581.187ms
benchHemera*1000: 296.767ms
benchMoleculerNats*1000: 205.468ms
benchSenecaNats*1000: 403.379ms
benchHemera*1000: 263.721ms
benchMoleculerNats*1000: 160.032ms
icebob commented 6 years ago

I think same different as in my benchmark

StarpTech commented 6 years ago

yes, but why I get so different results on my machine? :/

benchSenecaNats*1000: 499.532ms
benchHemera*1000: 552.870ms
benchMoleculerNats*1000: 1331.229ms
benchSenecaNats*1000: 375.143ms
benchHemera*1000: 252.240ms
benchMoleculerNats*1000: 1305.340ms
icebob commented 6 years ago

How did you run gnatsd? Without debug & verbose args?

StarpTech commented 6 years ago

yes simple starting with gnats

icebob commented 6 years ago

Ok, me too.

icebob commented 6 years ago

Firewall....etc?

StarpTech commented 6 years ago

They run in the same process they would be all affected but no I don't use any firewall except the built in.

StarpTech commented 6 years ago

That's interesting

Node.Js 6.10.0

benchSenecaNats*1000: 505.146ms
benchHemera*1000: 304.642ms
benchMoleculerNats*1000: 386.669ms
benchSenecaNats*1000: 415.556ms
benchHemera*1000: 274.675ms
benchMoleculerNats*1000: 331.495ms

Node.Js 8.4.0

benchSenecaNats*1000: 497.019ms
benchHemera*1000: 297.726ms
benchMoleculerNats*1000: 1350.801ms
benchSenecaNats*1000: 374.476ms
benchHemera*1000: 266.227ms
benchMoleculerNats*1000: 1326.481ms
icebob commented 6 years ago

Wow

StarpTech commented 6 years ago

I close the issue because there is a bug in moleculer with Node 8. Thank you for your provided informations.