Last active
July 16, 2016 22:39
-
-
Save jacobrosenthal/8f9c71a1fbc7c7541621189a37f2cc61 to your computer and use it in GitHub Desktop.
bindings timing test
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
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| corebluetooth bindings | |
| startScanning: 4.501ms | |
| stopScanning: 0.555ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| corebluetooth bindings | |
| startScanning: 8.440ms | |
| stopScanning: 0.465ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| corebluetooth bindings | |
| startScanning: 4.738ms | |
| stopScanning: 0.834ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| corebluetooth bindings | |
| startScanning: 5.285ms | |
| stopScanning: 0.429ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| corebluetooth bindings | |
| startScanning: 5.606ms | |
| stopScanning: 0.610ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| corebluetooth bindings | |
| startScanning: 4.230ms | |
| stopScanning: 0.454ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| corebluetooth bindings | |
| startScanning: 5.068ms | |
| stopScanning: 0.661ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| corebluetooth bindings | |
| startScanning: 4.875ms | |
| stopScanning: 0.439ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| corebluetooth bindings | |
| startScanning: 4.692ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| corebluetooth bindings | |
| startScanning: 4.829ms | |
| ^C |
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 async = require('async'); | |
| // console.log("xpc bindings"); | |
| // var noble = require('../index'); | |
| console.log("corebluetooth bindings"); | |
| var noble = require('../with-bindings')(require('../lib/mac/corebluetooth')); | |
| noble.on('stateChange', function(state) { | |
| if (state === 'poweredOn') { | |
| console.time("startScanning"); | |
| noble.startScanning([], true, function(){ | |
| console.timeEnd("startScanning"); | |
| }); | |
| } else { | |
| noble.stopScanning(); | |
| } | |
| }); | |
| noble.on('discover', function(peripheral) { | |
| console.time("stopScanning"); | |
| noble.stopScanning(function(){ | |
| console.timeEnd("stopScanning"); | |
| }); | |
| }); |
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
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| xpc bindings | |
| startScanning: 0.768ms | |
| stopScanning: 0.305ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| xpc bindings | |
| startScanning: 0.745ms | |
| stopScanning: 0.277ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| xpc bindings | |
| startScanning: 0.760ms | |
| stopScanning: 0.282ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| xpc bindings | |
| startScanning: 0.680ms | |
| stopScanning: 0.327ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| xpc bindings | |
| startScanning: 0.640ms | |
| stopScanning: 0.321ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| xpc bindings | |
| startScanning: 0.811ms | |
| stopScanning: 0.274ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| xpc bindings | |
| startScanning: 0.818ms | |
| stopScanning: 0.281ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| xpc bindings | |
| startScanning: 0.619ms | |
| stopScanning: 0.306ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| xpc bindings | |
| startScanning: 0.583ms | |
| stopScanning: 0.315ms | |
| ^C | |
| Jacobs-MacBook-Air:noble jacobrosenthal$ node examples/timetest.js | |
| xpc bindings | |
| startScanning: 0.736ms | |
| stopScanning: 0.301ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment