From 553532730ed504152f76f780344d2604ea17eb4d Mon Sep 17 00:00:00 2001 From: James Talmage Date: Fri, 29 Jan 2016 19:03:00 -0500 Subject: [PATCH] auto start the CPU profiler --- profile.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/profile.js b/profile.js index 6e8e1e8..273d1ec 100644 --- a/profile.js +++ b/profile.js @@ -90,6 +90,7 @@ events.on('test', function (data) { }); events.on('results', function (data) { + console.profileEnd(); console.log('RESULTS:', data.stats); }); @@ -103,4 +104,8 @@ events.on('stats', function () { process.argv[2] = JSON.stringify(opts); process.argv.length = 3; -require('./lib/test-worker'); +console.profile('AVA test-worker process'); + +setImmediate(function () { + require('./lib/test-worker'); +});