diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-06-24 04:40:51 +0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-06-24 07:05:29 +0400 |
commit | ba792ea2020f38ebf84925e740b42823b739d0d3 (patch) | |
tree | 077e5f345ceaf6c752a2fddbea5d68199a6d572b /benchmark | |
parent | 4c21aa736f4ca631efd77203113bf879e3fe4987 (diff) |
:%s/sys.puts/console.log/g
and there was much rejoicing
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/http_simple.js | 12 | ||||
-rw-r--r-- | benchmark/run.js | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/benchmark/http_simple.js b/benchmark/http_simple.js index 627835b7972..1ab9097fe3a 100644 --- a/benchmark/http_simple.js +++ b/benchmark/http_simple.js @@ -3,14 +3,14 @@ Buffer = require("buffer").Buffer; port = parseInt(process.env.PORT || 8000); -var puts = require("sys").puts; +var console.log = require("sys").console.log; var old = (process.argv[2] == 'old'); -puts('pid ' + process.pid); +console.log('pid ' + process.pid); http = require(old ? "http_old" : 'http'); -if (old) puts('old version'); +if (old) console.log('old version'); fixed = "" for (var i = 0; i < 20*1024; i++) { @@ -32,7 +32,7 @@ http.createServer(function (req, res) { if (n <= 0) throw "bytes called with n <= 0" if (stored[n] === undefined) { - puts("create stored[n]"); + console.log("create stored[n]"); stored[n] = ""; for (var i = 0; i < n; i++) { stored[n] += "C" @@ -44,7 +44,7 @@ http.createServer(function (req, res) { var n = parseInt(arg, 10) if (n <= 0) throw new Error("bytes called with n <= 0"); if (storedBuffer[n] === undefined) { - puts("create storedBuffer[n]"); + console.log("create storedBuffer[n]"); storedBuffer[n] = new Buffer(n); for (var i = 0; i < n; i++) { storedBuffer[n][i] = "C".charCodeAt(0); @@ -79,4 +79,4 @@ http.createServer(function (req, res) { } }).listen(port); -puts('Listening at http://127.0.0.1:'+port+'/'); +console.log('Listening at http://127.0.0.1:'+port+'/'); diff --git a/benchmark/run.js b/benchmark/run.js index 7917c768869..b1479b6006c 100644 --- a/benchmark/run.js +++ b/benchmark/run.js @@ -22,9 +22,9 @@ function runNext (i) { sys.print(benchmarks[i] + ": "); exec(benchmarks[i], function (elapsed, code) { if (code != 0) { - sys.puts("ERROR "); + console.log("ERROR "); } - sys.puts(elapsed); + console.log(elapsed); runNext(i+1); }); }; |