Created
April 17, 2014 17:46
-
-
Save tav/11000688 to your computer and use it in GitHub Desktop.
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
$ gauge -s -i js/bluebird.js -i js/rsvp.js -i js/mu.js test.js | |
## Point your web browsers at http://192.168.1.68:4040/ | |
>> connected: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36 | |
[1] Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36 | |
PASS µ 5000000 192 ns/op | |
PASS Bluebird 2000000 557 ns/op | |
PASS RSVP 1000000 2321 ns/op | |
>> connected: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:29.0) Gecko/20100101 Firefox/29.0 | |
[1] Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:29.0) Gecko/20100101 Firefox/29.0 | |
PASS µ 2000000 459 ns/op | |
PASS Bluebird 100000 6004 ns/op | |
PASS RSVP 200000 5807 ns/op |
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
gauge({ | |
"µ": function(t, async) { | |
var p = µ.promise(); | |
p.putValue(1); | |
p.then(function(v) { | |
t.done(); | |
}); | |
}, | |
"Bluebird": function(t, async) { | |
var p = new Promise(function (resolve, reject) { | |
resolve(1); | |
}); | |
p.then(function(v) { | |
t.done(); | |
}); | |
}, | |
"RSVP": function(t, async) { | |
var p = new RSVP.Promise(function(resolve, reject) { | |
resolve(1); | |
}); | |
p.then(function(v) { | |
t.done(); | |
}); | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment