diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2017-09-13 22:48:53 -0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2017-09-19 21:14:38 -0300 |
commit | e167ab71fb113fa38866dd11aa99af7079fb463c (patch) | |
tree | 3d91ca0f6e60d08fcab70833b851335e41b53cd0 /benchmark/child_process | |
parent | b1c8f15c5f169e021f7c46eb7b219de95fe97603 (diff) | |
download | android-node-v8-e167ab71fb113fa38866dd11aa99af7079fb463c.tar.gz android-node-v8-e167ab71fb113fa38866dd11aa99af7079fb463c.tar.bz2 android-node-v8-e167ab71fb113fa38866dd11aa99af7079fb463c.zip |
benchmark: var to const
PR-URL: https://github.com/nodejs/node/pull/13757
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'benchmark/child_process')
-rw-r--r-- | benchmark/child_process/child-process-exec-stdout.js | 2 | ||||
-rw-r--r-- | benchmark/child_process/child-process-read.js | 2 | ||||
-rw-r--r-- | benchmark/child_process/spawn-echo.js | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/benchmark/child_process/child-process-exec-stdout.js b/benchmark/child_process/child-process-exec-stdout.js index dcd352cfcf..1e78d445f8 100644 --- a/benchmark/child_process/child-process-exec-stdout.js +++ b/benchmark/child_process/child-process-exec-stdout.js @@ -3,7 +3,7 @@ const common = require('../common.js'); const { exec, execSync } = require('child_process'); const isWindows = process.platform === 'win32'; -var messagesLength = [64, 256, 1024, 4096]; +const messagesLength = [64, 256, 1024, 4096]; // Windows does not support command lines longer than 8191 characters if (!isWindows) messagesLength.push(32768); diff --git a/benchmark/child_process/child-process-read.js b/benchmark/child_process/child-process-read.js index c1b834e431..91c9964e8d 100644 --- a/benchmark/child_process/child-process-read.js +++ b/benchmark/child_process/child-process-read.js @@ -7,7 +7,7 @@ const common = require('../common.js'); const os = require('os'); const child_process = require('child_process'); -var messagesLength = [64, 256, 1024, 4096]; +const messagesLength = [64, 256, 1024, 4096]; // Windows does not support that long arguments if (os.platform() !== 'win32') messagesLength.push(32768); diff --git a/benchmark/child_process/spawn-echo.js b/benchmark/child_process/spawn-echo.js index 72822f87db..1ce40c3abf 100644 --- a/benchmark/child_process/spawn-echo.js +++ b/benchmark/child_process/spawn-echo.js @@ -1,12 +1,12 @@ 'use strict'; -var common = require('../common.js'); -var bench = common.createBenchmark(main, { +const common = require('../common.js'); +const bench = common.createBenchmark(main, { n: [1000] }); -var spawn = require('child_process').spawn; +const spawn = require('child_process').spawn; function main(conf) { - var n = +conf.n; + const n = +conf.n; bench.start(); go(n, n); @@ -16,7 +16,7 @@ function go(n, left) { if (--left === 0) return bench.end(n); - var child = spawn('echo', ['hello']); + const child = spawn('echo', ['hello']); child.on('exit', function(code) { if (code) process.exit(code); |