summaryrefslogtreecommitdiff
path: root/benchmark/http_simple.js
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-04-07 16:19:50 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-04-07 16:19:50 -0700
commit0281e1acf6e9cb3cd668dda91d4933160c4b95a7 (patch)
treeed05e4bbf9a489b81c69022990812d0511437a07 /benchmark/http_simple.js
parent970e9025fe17756f658bea97cc2c2969d71a7fa1 (diff)
downloadnode-new-0281e1acf6e9cb3cd668dda91d4933160c4b95a7.tar.gz
Fix benchmark script for testing both old and new version
Diffstat (limited to 'benchmark/http_simple.js')
-rw-r--r--benchmark/http_simple.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/benchmark/http_simple.js b/benchmark/http_simple.js
index 99685f78ab..9bfeadb2cc 100644
--- a/benchmark/http_simple.js
+++ b/benchmark/http_simple.js
@@ -1,7 +1,10 @@
path = require("path");
var puts = require("sys").puts;
-http = require("http");
+var old = false;
+
+http = require(old ? "http_old" : 'http');
+if (old) puts('old version');
fixed = ""
for (var i = 0; i < 20*1024; i++) {
@@ -49,5 +52,6 @@ http.createServer(function (req, res) {
, "Content-Length": content_length
}
);
+ if (old) res.write(body, 'ascii');
res.close(body, 'ascii');
}).listen(8000);