Skip to content

Commit

Permalink
Update benchmarks with new createChildProcess API
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Oct 7, 2009
1 parent abbc624 commit 1a2762b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion benchmark/process_loop.js
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions benchmark/run.js
Expand Up @@ -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);
Expand Down

0 comments on commit 1a2762b

Please sign in to comment.