Skip to content

Commit

Permalink
Name benchmark functions for meaningful profiling output
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Loring committed Feb 23, 2016
1 parent 8c87f2f commit b8c6fc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions benchmarks/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
var http = require('http');
var cp = require('child_process');

var server = http.createServer(function(req, res) {
var server = http.createServer(function handler(req, res) {
res.end(new Array(100).join(','));
});

server.listen(8080, function() {
server.listen(8080, function listened() {
cp.spawn('ab', [ '-n', '110000', '-c', '10', 'http://127.0.0.1:8080/' ])
.on('close', function() { server.close(); });
.on('close', function closer() { server.close(); });
});

0 comments on commit b8c6fc6

Please sign in to comment.