Permalink
Browse files

updated scripts

  • Loading branch information...
1 parent babcbdc commit a0f17d4b430c65d20d23f2adaee415f403db86c2 @billywhizz committed May 28, 2011
Showing with 19 additions and 25 deletions.
  1. +7 −6 bench.sh
  2. +1 −0 pull.sh
  3. +2 −0 push.sh
  4. +0 −14 results.txt
  5. +3 −2 src/node_http_parser.cc
  6. +6 −3 tests.js
View
@@ -1,6 +1,7 @@
-./tests.js 1 10000
-./tests.js 2 10000
-./tests.js 256 50000
-./tests.js 1024 50000
-./tests.js 4096 50000
-./tests.js 16384 50000
+VER=$(git tag | tail -1)
+./tests.js 1 10000 false $VER 1>>out.dat
+./tests.js 2 10000 false $VER 1>>out.dat
+./tests.js 256 50000 false $VER 1>>out.dat
+./tests.js 1024 50000 false $VER 1>>out.dat
+./tests.js 4096 50000 false $VER 1>>out.dat
+./tests.js 16384 50000 false $VER 1>>out.dat
View
@@ -0,0 +1 @@
+git pull origin master
View
@@ -0,0 +1,2 @@
+#git remote add origin git@github.com:billywhizz/node-http-parser.git
+git push -u origin master
View
@@ -1,14 +0,0 @@
-test buffersize parses time parse/sec
-* v0.0.3
-node 1 10000 4.56 2191.54
-c++ 1 10000 2.21 4526.94
-node 2 10000 2.50 4003.20
-c++ 2 10000 1.25 7993.61
-node 256 50176 1.88 26717.78
-c++ 256 50176 1.09 45906.68
-node 1024 50176 1.71 29325.54
-c++ 1024 50176 0.98 51200.00
-node 4096 53248 1.84 28923.41
-c++ 4096 53248 1.03 51697.09
-node 16384 65536 2.15 30552.91
-c++ 16384 65536 1.26 51848.10
View
@@ -160,14 +160,15 @@ method_to_str(unsigned short m) {
class Parser : public ObjectWrap {
public:
- // TODO: change this to use v8 Strings and user String.asciiWrite() & String.Length()
+ // TODO: change this to use v8 Strings and use String.asciiWrite() & String.Length()
char _field[255];
int _field_off;
char _value[4096];
int _value_off;
Persistent<Object> _headers;
Persistent<Object> _info;
-
+ Persistent<Function> _cb;
+
Parser(enum http_parser_type type) : ObjectWrap() {
Init(type);
}
View
@@ -16,10 +16,13 @@ response.push("set-cookie: session-id=277-1111279-4168403; path=/; domain=.amazo
var display = false;
var chunksize = parseInt(process.ARGV[2]);
var messages = parseInt(process.ARGV[3]);
+var version = "0.0.0";
if(process.ARGV.length > 4) {
display = (process.ARGV[4] === "true");
}
-
+if(process.ARGV.length > 5) {
+ version = process.ARGV[5];
+}
function testcpp(buff, type) {
var rr = "";
@@ -53,7 +56,7 @@ function testcpp(buff, type) {
var now = new Date().getTime();
process.stderr.write("end: " + now + "\n");
var elapsed = (now-then)/1000;
- process.stdout.write("c++\t" + chunksize + "\t" + parsed + "\t" + elapsed.toFixed(2) + "\t" + (parsed/elapsed).toFixed(2) + "\n");
+ process.stdout.write(version + "\tc++\t" + chunksize + "\t" + parsed + "\t" + elapsed.toFixed(2) + "\t" + (parsed/elapsed).toFixed(2) + "\n");
payload = null;
parser = null;
}
@@ -146,7 +149,7 @@ function testnode(buff, type) {
var now = new Date().getTime();
process.stderr.write("end: " + now + "\n");
var elapsed = (now-then)/1000;
- process.stdout.write("node\t" + chunksize + "\t" + parsed + "\t" + elapsed.toFixed(2) + "\t" + (parsed/elapsed).toFixed(2) + "\n");
+ process.stdout.write(version + "\tnode\t" + chunksize + "\t" + parsed + "\t" + elapsed.toFixed(2) + "\t" + (parsed/elapsed).toFixed(2) + "\n");
payload = null;
parser = null;
}

0 comments on commit a0f17d4

Please sign in to comment.