Last active
December 14, 2015 14:09
-
-
Save adamvr/5098647 to your computer and use it in GitHub Desktop.
mqtt.js benching
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11.82user 3.12system 0:15.08elapsed 99%CPU (0avgtext+0avgdata 85588maxresident)k | |
0inputs+0outputs (0major+21984minor)pagefaults 0swaps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9.70user 2.70system 0:12.42elapsed 99%CPU (0avgtext+0avgdata 82476maxresident)k | |
0inputs+0outputs (0major+21110minor)pagefaults 0swaps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mqtt = require('mqtt'); mqtt.createClient().on('connect', function() { for (var i = 0; i < 100000; i += 1) { this.publish('test', 'test'); } this.end(); }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# Remove previous mqtt | |
npm rm mqtt | |
# Bench v0.2.1 | |
npm install [email protected] | |
/usr/bin/time -o 0.2.1.output node bench.js | |
# Bench v0.2.2 | |
npm install [email protected] | |
/usr/bin/time -o 0.2.2.output node bench.js | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment