From 1a2762b78e496dac4cc9fd0fb4ffb1d4f036692b Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 7 Oct 2009 10:24:50 +0200 Subject: [PATCH] Update benchmarks with new createChildProcess API --- benchmark/process_loop.js | 2 +- benchmark/run.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/benchmark/process_loop.js b/benchmark/process_loop.js index e338ad3806..6f4d07ea94 100644 --- a/benchmark/process_loop.js +++ b/benchmark/process_loop.js @@ -4,7 +4,7 @@ node.mixin(require("/utils.js")); function next (i) { if (i <= 0) return; - var child = node.createChildProcess("echo hello"); + var child = node.createChildProcess("echo", ["hello"]); child.addListener("output", function (chunk) { if (chunk) print(chunk); diff --git a/benchmark/run.js b/benchmark/run.js index 869ae55a63..6379a16fe2 100644 --- a/benchmark/run.js +++ b/benchmark/run.js @@ -9,9 +9,8 @@ var benchmarks = [ "static_http_server.js" var benchmark_dir = node.path.dirname(__filename); function exec (script, callback) { - var command = ARGV[0] + " " + node.path.join(benchmark_dir, script); var start = new Date(); - var child = node.createChildProcess(command); + var child = node.createChildProcess(ARGV[0], [node.path.join(benchmark_dir, script)]); child.addListener("exit", function (code) { var elapsed = new Date() - start; callback(elapsed, code);