Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions benchmark/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ exports.PORT = process.env.PORT || 12346;

// If this is the main module, then run the benchmarks
if (module === require.main) {
hasWrk();
var type = process.argv[2];
var testFilter = process.argv[3];
if (!type) {
Expand Down Expand Up @@ -92,14 +91,14 @@ function Benchmark(fn, options) {

var self = this;

hasWrk();
process.nextTick(function() {
self._run();
});
}

// benchmark an http server.
Benchmark.prototype.http = function(p, args, cb) {
hasWrk();
var self = this;
var regexp = /Requests\/sec:[ \t]+([0-9\.]+)/;
var url = 'http://127.0.0.1:' + exports.PORT + p;
Expand Down