Merge pull request from koajs/delegate-next-bench

benchmark: use generator delegation
This commit is contained in:
TJ Holowaychuk 2013-12-25 09:25:00 -08:00
commit b944b89df7

View file

@ -10,14 +10,14 @@ console.log(' %s middleware', n);
while (n--) {
app.use(function *(next){
yield next;
yield *next;
});
}
var body = new Buffer('Hello World');
app.use(function *(next){
yield next;
yield *next;
this.body = body;
});