summaryrefslogtreecommitdiff
path: root/benchmark/child_process
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2017-04-11 11:18:48 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2017-04-19 22:58:26 +0800
commit3d7c82bd612ebb9190d54b80c90ceed3310161aa (patch)
tree53f9162305eb5605d662be0ac4c5ab050f73e796 /benchmark/child_process
parent211813c99c97e2c48c67323a7ee5cb2ed7f03d57 (diff)
downloadandroid-node-v8-3d7c82bd612ebb9190d54b80c90ceed3310161aa.tar.gz
android-node-v8-3d7c82bd612ebb9190d54b80c90ceed3310161aa.tar.bz2
android-node-v8-3d7c82bd612ebb9190d54b80c90ceed3310161aa.zip
test: add test for child_process benchmark
PR-URL: https://github.com/nodejs/node/pull/12326 Ref: https://github.com/nodejs/node/issues/12068 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Diffstat (limited to 'benchmark/child_process')
-rw-r--r--benchmark/child_process/spawn-echo.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/benchmark/child_process/spawn-echo.js b/benchmark/child_process/spawn-echo.js
index 7c9e851aac..72822f87db 100644
--- a/benchmark/child_process/spawn-echo.js
+++ b/benchmark/child_process/spawn-echo.js
@@ -1,15 +1,15 @@
'use strict';
var common = require('../common.js');
var bench = common.createBenchmark(main, {
- thousands: [1]
+ n: [1000]
});
var spawn = require('child_process').spawn;
function main(conf) {
- var len = +conf.thousands * 1000;
+ var n = +conf.n;
bench.start();
- go(len, len);
+ go(n, n);
}
function go(n, left) {