diff options
Diffstat (limited to 'deps/node/benchmark/child_process/spawn-echo.js')
-rw-r--r-- | deps/node/benchmark/child_process/spawn-echo.js | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/deps/node/benchmark/child_process/spawn-echo.js b/deps/node/benchmark/child_process/spawn-echo.js deleted file mode 100644 index 8f5c80cd..00000000 --- a/deps/node/benchmark/child_process/spawn-echo.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -const common = require('../common.js'); -const bench = common.createBenchmark(main, { - n: [1000] -}); - -const spawn = require('child_process').spawn; -function main({ n }) { - bench.start(); - go(n, n); -} - -function go(n, left) { - if (--left === 0) - return bench.end(n); - - const child = spawn('echo', ['hello']); - child.on('exit', (code) => { - if (code) - process.exit(code); - else - go(n, left); - }); -} |