Skip to content

Commit

Permalink
:%s/sys.puts/console.log/g
Browse files Browse the repository at this point in the history
and there was much rejoicing
  • Loading branch information
ry committed Jun 24, 2010
1 parent 4c21aa7 commit ba792ea
Show file tree
Hide file tree
Showing 92 changed files with 352 additions and 396 deletions.
12 changes: 6 additions & 6 deletions benchmark/http_simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand All @@ -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"
Expand All @@ -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);
Expand Down Expand Up @@ -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+'/');
4 changes: 2 additions & 2 deletions benchmark/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
};
Expand Down
6 changes: 2 additions & 4 deletions bin/node-repl
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/usr/bin/env node

var puts = require("sys").puts;

puts("Type '.help' for options.");
puts("(The REPL can also be started by typing 'node' without arguments)");
console.log("Type '.help' for options.");
console.log("(The REPL can also be started by typing 'node' without arguments)");

require('repl').start();

Expand Down
Loading

0 comments on commit ba792ea

Please sign in to comment.