summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-06-23 17:40:51 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-06-23 20:05:29 -0700
commitba792ea2020f38ebf84925e740b42823b739d0d3 (patch)
tree077e5f345ceaf6c752a2fddbea5d68199a6d572b /benchmark
parent4c21aa736f4ca631efd77203113bf879e3fe4987 (diff)
downloadandroid-node-v8-ba792ea2020f38ebf84925e740b42823b739d0d3.tar.gz
android-node-v8-ba792ea2020f38ebf84925e740b42823b739d0d3.tar.bz2
android-node-v8-ba792ea2020f38ebf84925e740b42823b739d0d3.zip
:%s/sys.puts/console.log/g
and there was much rejoicing
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/http_simple.js12
-rw-r--r--benchmark/run.js4
2 files changed, 8 insertions, 8 deletions
diff --git a/benchmark/http_simple.js b/benchmark/http_simple.js
index 627835b797..1ab9097fe3 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 7917c76886..b1479b6006 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);
});
};