Permalink
Browse files

more benchmarks

  • Loading branch information...
1 parent b042339 commit 430699c0828aa6378185326279bfe5819d444bb7 @tj tj committed Apr 27, 2012
Showing with 12 additions and 1 deletion.
  1. +8 −0 support/app.js
  2. +4 −1 support/bench
View
@@ -35,6 +35,14 @@ app.get('/json', function(req, res){
res.send({ name: 'Tobi', role: 'admin' });
});
+app.get('/json/:n', function(req, res){
+ var n = ~~req.params.n;
+ var arr = [];
+ var obj = { name: 'Tobi', role: 'admin' };
+ while (n--) arr.push(obj);
+ res.send(arr);
+});
+
function foo(req, res, next) {
next();
}
View
@@ -14,9 +14,12 @@ sleep .5
bench / "Hello World"
bench /blog "Mounted Hello World"
bench /blog/admin "Mounted 2 Hello World"
-bench /json "JSON"
bench /middleware "Middleware"
bench /match "Router"
bench /render "Render"
+bench /json "JSON tiny"
+bench /json/15 "JSON small"
+bench /json/50 "JSON medium"
+bench /json/150 "JSON large"
kill -9 $pid

0 comments on commit 430699c

Please sign in to comment.