Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

benchmark: don't check wrk when testing non-http benchmark #1368

Closed
wants to merge 1 commit into from
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