diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-05-02 21:10:10 +0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-05-05 10:19:17 -0700 |
commit | 7cfcf8069bb91240d25f83fa5ab5b7af2da49260 (patch) | |
tree | d5865e24bbf1f22408f86b0dc50699302cbcd21d /test/fixtures/workload | |
parent | 0171bab46d6f57cf6b1ba89d4a79a022139937d1 (diff) | |
download | android-node-v8-7cfcf8069bb91240d25f83fa5ab5b7af2da49260.tar.gz android-node-v8-7cfcf8069bb91240d25f83fa5ab5b7af2da49260.tar.bz2 android-node-v8-7cfcf8069bb91240d25f83fa5ab5b7af2da49260.zip |
inspector: implement --cpu-prof-interval
This patch implements --cpu-prof-interval to specify the sampling
interval of the CPU profiler started by --cpu-prof from the command
line. Also adjust the interval to 100 in test-cpu-prof.js to make
the test less flaky - it would fail if the time taken to finish
the workload is smaller than the sampling interval, which was
more likely on powerful machines when the interval was 1000.
PR-URL: https://github.com/nodejs/node/pull/27535
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'test/fixtures/workload')
-rw-r--r-- | test/fixtures/workload/fibonacci-worker-argv.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/fixtures/workload/fibonacci-worker-argv.js b/test/fixtures/workload/fibonacci-worker-argv.js index 9c968bfeec..69a78ec4e1 100644 --- a/test/fixtures/workload/fibonacci-worker-argv.js +++ b/test/fixtures/workload/fibonacci-worker-argv.js @@ -3,5 +3,9 @@ const { Worker } = require('worker_threads'); const path = require('path'); new Worker(path.join(__dirname, 'fibonacci.js'), { - execArgv: ['--cpu-prof'] + execArgv: [ + '--cpu-prof', + '--cpu-prof-interval', + process.env.CPU_PROF_INTERVAL || '100' + ] }); |