Skip to content

Commit 5535327

Browse files
committed
auto start the CPU profiler
1 parent e38c56a commit 5535327

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

profile.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ events.on('test', function (data) {
9090
});
9191

9292
events.on('results', function (data) {
93+
console.profileEnd();
9394
console.log('RESULTS:', data.stats);
9495
});
9596

@@ -103,4 +104,8 @@ events.on('stats', function () {
103104
process.argv[2] = JSON.stringify(opts);
104105
process.argv.length = 3;
105106

106-
require('./lib/test-worker');
107+
console.profile('AVA test-worker process');
108+
109+
setImmediate(function () {
110+
require('./lib/test-worker');
111+
});

0 commit comments

Comments
 (0)