diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2017-12-30 04:00:22 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-01-23 01:29:32 +0100 |
commit | d49580d8121c1ca75b53fbbc4445f68deb6207a4 (patch) | |
tree | 3a0102d410caa7300e83424132b74b2f3acbc5e5 /benchmark/child_process/child-process-exec-stdout.js | |
parent | 8e3d7623a54123821ad731c63c8ea661ca5c84c8 (diff) | |
download | android-node-v8-d49580d8121c1ca75b53fbbc4445f68deb6207a4.tar.gz android-node-v8-d49580d8121c1ca75b53fbbc4445f68deb6207a4.tar.bz2 android-node-v8-d49580d8121c1ca75b53fbbc4445f68deb6207a4.zip |
benchmark: (child_process) use destructuring
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'benchmark/child_process/child-process-exec-stdout.js')
-rw-r--r-- | benchmark/child_process/child-process-exec-stdout.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/benchmark/child_process/child-process-exec-stdout.js b/benchmark/child_process/child-process-exec-stdout.js index 1e78d445f8..a891026b86 100644 --- a/benchmark/child_process/child-process-exec-stdout.js +++ b/benchmark/child_process/child-process-exec-stdout.js @@ -12,12 +12,10 @@ const bench = common.createBenchmark(childProcessExecStdout, { dur: [5] }); -function childProcessExecStdout(conf) { +function childProcessExecStdout({ dur, len }) { bench.start(); - const maxDuration = conf.dur * 1000; - const len = +conf.len; - + const maxDuration = dur * 1000; const cmd = `yes "${'.'.repeat(len)}"`; const child = exec(cmd, { 'stdio': ['ignore', 'pipe', 'ignore'] }); |