diff options
author | Jackson Tian <puling.tyq@alibaba-inc.com> | 2015-04-08 16:14:54 +0800 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2015-04-09 12:09:09 +0200 |
commit | d2b62a49731b9204359b4d346ca0d017fa2c985f (patch) | |
tree | c0be8d65dff9bb786bacc114c55264a02baca297 /benchmark/common.js | |
parent | b464d467a25bed458cf800ff5117af1c1df8841a (diff) | |
download | android-node-v8-d2b62a49731b9204359b4d346ca0d017fa2c985f.tar.gz android-node-v8-d2b62a49731b9204359b4d346ca0d017fa2c985f.tar.bz2 android-node-v8-d2b62a49731b9204359b4d346ca0d017fa2c985f.zip |
benchmark: don't check wrk in non-http benchmark
When running a non-http benchmark, there is no need the check for the
wrk tool so move the wrk check into the http method.
PR-URL: https://github.com/iojs/io.js/pull/1368
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'benchmark/common.js')
-rw-r--r-- | benchmark/common.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/benchmark/common.js b/benchmark/common.js index 199d9a54f5..c7961e5654 100644 --- a/benchmark/common.js +++ b/benchmark/common.js @@ -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) { @@ -92,7 +91,6 @@ function Benchmark(fn, options) { var self = this; - hasWrk(); process.nextTick(function() { self._run(); }); @@ -100,6 +98,7 @@ function Benchmark(fn, options) { // 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; |