Skip to content

Commit

Permalink
add st to benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Rodriguez committed Nov 2, 2012
1 parent e8545fa commit f67b208
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ slower! Well, almost (summary from buffet's `make bench-html`):
```
serving a 4k html file, siege -c 10:
**************** nginx (7494.18 rps)
**************** varnish (7118.13 rps)
*************** buffet-server (6757.84 rps)
************** buffet (6102.97 rps)
********* node-static (3983.48 rps)
******* paperboy (3267.68 rps)
******* send (3214.04 rps)
****** ecstatic (2530.49 rps)
**************** nginx (7653.15 rps)
**************** varnish (7323.69 rps)
*************** buffet-server (6803.9 rps)
************** buffet (6297.18 rps)
********** st (4338.95 rps)
********* node-static (4050.1 rps)
******** send (3363.26 rps)
******* paperboy (3283.29 rps)
****** ecstatic (2556.29 rps)
```

Continuous deployment is also becoming all the rage, and restarting Varnish is
Expand Down
3 changes: 2 additions & 1 deletion bench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"node-static": "~0.6.0",
"paperboy": "~0.0.5",
"send": "~0.0.4",
"connect": "~2.5.0"
"connect": "~2.5.0",
"st": "0.0.11"
}
}
23 changes: 23 additions & 0 deletions bench/st.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
exports.middleware = function (options) {
return require('st')({
path: options.root,
url: '/',

cache: {
fd: {
max: 1000, // number of fd's to hang on to
maxAge: 1000*60*60, // amount of ms before fd's expire
},

stat: {
max: 5000, // number of stat objects to hang on to
maxAge: 1000 * 60, // number of ms that stats are good for
},

content: {
max: 1024*1024*64, // how much memory to use on caching contents
maxAge: 1000 * 60 * 10, // how long to cache contents for
}
}
});
};

0 comments on commit f67b208

Please sign in to comment.