Permalink
Browse files

sys is deprecated, use util

  • Loading branch information...
1 parent 7470cfe commit a89d92a35d7e300ddd9c159028a165caa56ced73 @rmehner rmehner committed Dec 5, 2011
@@ -1,7 +1,7 @@
require('../../test/common');
var COUNT = 1e6,
dirty = require('dirty')(),
- sys = require('sys');
+ util = require('util');
for (var i = 0; i < COUNT; i++) {
dirty.set(i, i);
@@ -19,5 +19,5 @@ var ms = +new Date - start,
million = COUNT / 1e6;
// Can't use console.log() since since I also test this in ancient node versions
-sys.puts(mhz+' Mhz ('+million+' million in '+ms+' ms)');
+util.log(mhz+' Mhz ('+million+' million in '+ms+' ms)');
View
@@ -1,7 +1,7 @@
require('../../test/common');
var COUNT = 1e6,
dirty = require('dirty')(),
- sys = require('sys');
+ util = require('util');
for (var i = 0; i < COUNT; i++) {
dirty.set(i, i);
@@ -19,5 +19,5 @@ var ms = +new Date - start,
million = COUNT / 1e6;
// Can't use console.log() since since I also test this in ancient node versions
-sys.puts(mhz+' Mhz ('+million+' million in '+ms+' ms)');
+util.log(mhz+' Mhz ('+million+' million in '+ms+' ms)');
View
@@ -2,7 +2,7 @@ require('../../test/common');
var COUNT = 1e4,
DB_FILE = __dirname+'/../../test/tmp/benchmark-set-drain.dirty',
dirty = require('dirty')(DB_FILE),
- sys = require('sys'),
+ util = require('util'),
loaded = false;
for (var i = 0; i < COUNT; i++) {
@@ -17,7 +17,7 @@ dirty.on('drain', function() {
million = COUNT / 1e6;
// Can't use console.log() since since I also test this in ancient node versions
- sys.puts(mhz+' Hz ('+million+' million in '+ms+' ms)');
+ util.log(mhz+' Hz ('+million+' million in '+ms+' ms)');
loaded = true;
@@ -1,7 +1,7 @@
require('../../test/common');
var COUNT = 1e5,
dirty = require('dirty')(__dirname+'/../../test/tmp/benchmark-set-drain.dirty'),
- sys = require('sys'),
+ util = require('util'),
drained = false;
var start = +new Date;
@@ -15,7 +15,7 @@ dirty.on('drain', function() {
million = COUNT / 1e6;
// Can't use console.log() since since I also test this in ancient node versions
- sys.puts(mhz+' Hz ('+million+' million in '+ms+' ms)');
+ util.log(mhz+' Hz ('+million+' million in '+ms+' ms)');
drained = true;
});
@@ -1,7 +1,7 @@
require('../../test/common');
var COUNT = 1e4,
dirty = require('dirty')(__dirname+'/../../test/tmp/benchmark-set-drain.dirty'),
- sys = require('sys'),
+ util = require('util'),
drained = false;
var start = +new Date;
@@ -15,7 +15,7 @@ dirty.on('drain', function() {
million = COUNT / 1e6;
// Can't use console.log() since since I also test this in ancient node versions
- sys.puts(mhz+' Hz ('+million+' million in '+ms+' ms)');
+ util.log(mhz+' Hz ('+million+' million in '+ms+' ms)');
drained = true;
});
View
@@ -1,7 +1,7 @@
require('../../test/common');
var COUNT = 1e6,
dirty = require('dirty')(__dirname+'/../../test/tmp/benchmark-set.dirty'),
- sys = require('sys');
+ util = require('util');
var start = +new Date;
for (var i = 0; i < COUNT; i++) {
@@ -13,6 +13,6 @@ var ms = +new Date - start,
million = COUNT / 1e6;
// Can't use console.log() since since I also test this in ancient node versions
-sys.puts(mhz+' Mhz ('+million+' million in '+ms+' ms)');
+util.log(mhz+' Mhz ('+million+' million in '+ms+' ms)');
process.exit(0);
@@ -1,5 +1,5 @@
var COUNT = 1e7,
- sys = require('sys'),
+ util = require('util'),
a = [];
for (var i = 0; i < COUNT; i++) {
@@ -18,5 +18,5 @@ var ms = +new Date - start,
million = COUNT / 1e6;
// Can't use console.log() since since I also test this in ancient node versions
-sys.puts(mhz+' Mhz ('+million+' million in '+ms+' ms)');
+util.log(mhz+' Mhz ('+million+' million in '+ms+' ms)');
@@ -1,5 +1,5 @@
var COUNT = 1e7,
- sys = require('sys'),
+ util = require('util'),
a = [];
for (var i = 0; i < COUNT; i++) {
@@ -18,4 +18,4 @@ var ms = +new Date - start,
million = COUNT / 1e6;
// Can't use console.log() since since I also test this in ancient node versions
-sys.puts(mhz+' Mhz ('+million+' million in '+ms+' ms)');
+util.log(mhz+' Mhz ('+million+' million in '+ms+' ms)');
@@ -1,5 +1,5 @@
var COUNT = 1e7,
- sys = require('sys'),
+ util = require('util'),
a = [];
for (var i = 0; i < COUNT; i++) {
@@ -18,4 +18,4 @@ var ms = +new Date - start,
million = COUNT / 1e6;
// Can't use console.log() since since I also test this in ancient node versions
-sys.puts(mhz+' Mhz ('+million+' million in '+ms+' ms)');
+util.log(mhz+' Mhz ('+million+' million in '+ms+' ms)');
@@ -1,5 +1,5 @@
var COUNT = 1e6,
- sys = require('sys'),
+ util = require('util'),
a = [];
var start = +new Date;
@@ -12,4 +12,4 @@ var ms = +new Date - start,
million = COUNT / 1e6;
// Can't use console.log() since since I also test this in ancient node versions
-sys.puts(mhz+' Mhz ('+million+' million in '+ms+' ms)');
+util.log(mhz+' Mhz ('+million+' million in '+ms+' ms)');
@@ -1,5 +1,5 @@
var COUNT = 1e6,
- sys = require('sys'),
+ util = require('util'),
a = [];
var start = +new Date;
@@ -12,4 +12,4 @@ var ms = +new Date - start,
million = COUNT / 1e6;
// Can't use console.log() since since I also test this in ancient node versions
-sys.puts(mhz+' Mhz ('+million+' million in '+ms+' ms)');
+util.log(mhz+' Mhz ('+million+' million in '+ms+' ms)');
@@ -1,5 +1,5 @@
var COUNT = 1e7,
- sys = require('sys'),
+ util = require('util'),
o = {};
for (var i = 0; i < COUNT; i++) {
@@ -18,4 +18,4 @@ var ms = +new Date - start,
million = COUNT / 1e6;
// Can't use console.log() since since I also test this in ancient node versions
-sys.puts(mhz+' Mhz ('+million+' million in '+ms+' ms)');
+util.log(mhz+' Mhz ('+million+' million in '+ms+' ms)');
@@ -1,5 +1,5 @@
var COUNT = 1e6,
- sys = require('sys'),
+ util = require('util'),
o = {};
for (var i = 0; i < COUNT; i++) {
@@ -18,4 +18,4 @@ var ms = +new Date - start,
million = COUNT / 1e6;
// Can't use console.log() since since I also test this in ancient node versions
-sys.puts(mhz+' Mhz ('+million+' million in '+ms+' ms)');
+util.log(mhz+' Mhz ('+million+' million in '+ms+' ms)');
@@ -1,5 +1,5 @@
var COUNT = 1e6,
- sys = require('sys'),
+ util = require('util'),
o = {};
for (var i = 0; i < COUNT; i++) {
@@ -18,4 +18,4 @@ var ms = +new Date - start,
million = COUNT / 1e6;
// Can't use console.log() since since I also test this in ancient node versions
-sys.puts(mhz+' Mhz ('+million+' million in '+ms+' ms)');
+util.log(mhz+' Mhz ('+million+' million in '+ms+' ms)');
@@ -1,5 +1,5 @@
var COUNT = 1e6,
- sys = require('sys'),
+ util = require('util'),
o = {};
var start = +new Date;
@@ -12,4 +12,4 @@ var ms = +new Date - start,
million = COUNT / 1e6;
// Can't use console.log() since since I also test this in ancient node versions
-sys.puts(mhz+' Mhz ('+million+' million in '+ms+' ms)');
+util.log(mhz+' Mhz ('+million+' million in '+ms+' ms)');
View
@@ -1,7 +1,7 @@
if (global.GENTLY) require = GENTLY.hijack(require);
var fs = require('fs'),
- sys = require('sys'),
+ util = require('util'),
EventEmitter = require('events').EventEmitter;
var Dirty = exports.Dirty = function(path) {
@@ -21,7 +21,7 @@ var Dirty = exports.Dirty = function(path) {
this._load();
};
-sys.inherits(Dirty, EventEmitter);
+util.inherits(Dirty, EventEmitter);
Dirty.Dirty = Dirty;
module.exports = Dirty;

0 comments on commit a89d92a

Please sign in to comment.