projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
970e902
)
Fix benchmark script for testing both old and new version
author
Ryan Dahl
<ry@tinyclouds.org>
Wed, 7 Apr 2010 23:19:50 +0000
(16:19 -0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Wed, 7 Apr 2010 23:19:50 +0000
(16:19 -0700)
benchmark/http_simple.js
patch
|
blob
|
history
diff --git
a/benchmark/http_simple.js
b/benchmark/http_simple.js
index
99685f7
..
9bfeadb
100644
(file)
--- 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);