Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Fix benchmark script for testing both old and new version
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Apr 7, 2010
1 parent 970e902 commit 0281e1a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion benchmark/http_simple.js
Original file line number Diff line number Diff line change
@@ -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++) {
Expand Down Expand Up @@ -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);

0 comments on commit 0281e1a

Please sign in to comment.