-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathrun.js
More file actions
19 lines (16 loc) · 743 Bytes
/
run.js
File metadata and controls
19 lines (16 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const cp = require('child_process');
const BENCHMARKS = [ 'bluebird-doxbee.js', 'bluebird-parallel.js', 'wikipedia.js', 'hapiserver.js', 'koaserver.js'];
const hook = './async-hook.js';
async function main() {
for (benchmark of BENCHMARKS) {
const regular = cp.spawnSync(process.execPath, [ benchmark ]);
console.log(`regular ${regular.stdout.toString().trim()}`);
const init = cp.spawnSync(process.execPath,
[ '--require', './async-hook-init.js', benchmark ]);
console.log(`init ${init.stdout.toString().trim()}`);
const full = cp.spawnSync(process.execPath,
[ '--require', './async-hook-full.js', benchmark ]);
console.log(`full ${full.stdout.toString().trim()}`);
}
}
main().catch(console.error);