diff options
author | Ryan <ry@tinyclouds.org> | 2009-08-26 22:11:51 +0200 |
---|---|---|
committer | Ryan <ry@tinyclouds.org> | 2009-08-26 22:36:45 +0200 |
commit | ad9d683f9fe9eabe2d797bd6f2ffddf02b0ea009 (patch) | |
tree | bc451339e6adf98dd7036fdb51fe5514c4e20a3f /benchmark | |
parent | 116f4dea052c9d59f6666345ccde4af5774b1bc2 (diff) | |
download | node-new-ad9d683f9fe9eabe2d797bd6f2ffddf02b0ea009.tar.gz |
API: rename node.Process to node.ChildProcess
This is to avoid confusion with the global "process" object, especially for
the instances of node.Process.
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/process_loop.js | 6 | ||||
-rw-r--r-- | benchmark/run.js | 4 | ||||
-rw-r--r-- | benchmark/static_http_server.js | 12 |
3 files changed, 10 insertions, 12 deletions
diff --git a/benchmark/process_loop.js b/benchmark/process_loop.js index eb2df746b8..67b9edd74b 100644 --- a/benchmark/process_loop.js +++ b/benchmark/process_loop.js @@ -1,13 +1,13 @@ function next (i) { if (i <= 0) return; - var process = node.createProcess("echo hello"); + var child = node.createChildProcess("echo hello"); - process.addListener("output", function (chunk) { + child.addListener("output", function (chunk) { if (chunk) print(chunk); }); - process.addListener("exit", function (code) { + child.addListener("exit", function (code) { if (code != 0) node.exit(-1); next(i - 1); }); diff --git a/benchmark/run.js b/benchmark/run.js index 4bb2f5c4db..a8a4d1715e 100644 --- a/benchmark/run.js +++ b/benchmark/run.js @@ -8,8 +8,8 @@ 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 process = node.createProcess(command); - process.addListener("exit", function (code) { + var child = node.createChildProcess(command); + child.addListener("exit", function (code) { var elapsed = new Date() - start; callback(elapsed, code); }); diff --git a/benchmark/static_http_server.js b/benchmark/static_http_server.js index debdceb336..ef465a8462 100644 --- a/benchmark/static_http_server.js +++ b/benchmark/static_http_server.js @@ -34,11 +34,9 @@ function responseListener (res) { }); } -function onLoad () { - for (var i = 0; i < concurrency; i++) { - var client = node.http.createClient(port); - client.id = i; - client.get("/").finish(responseListener); - requests++; - } +for (var i = 0; i < concurrency; i++) { + var client = node.http.createClient(port); + client.id = i; + client.get("/").finish(responseListener); + requests++; } |