diff options
author | Andreas Madsen <amwebdk@gmail.com> | 2016-05-31 22:49:16 +0300 |
---|---|---|
committer | Andreas Madsen <amwebdk@gmail.com> | 2016-07-26 14:21:50 +0300 |
commit | 8bb59fdb127b060d38430c0428d7783931ebec6e (patch) | |
tree | fb0ba5c611c27b19480c11349283030cf463d986 /benchmark | |
parent | f99471b2ae147fbb072223be62e9100862379dc8 (diff) |
benchmark: missing process.exit after bench.end
Previously bench.end would call process.exit(0) however this is rather
confusing and indeed a few benchmarks had code that assumed otherwise.
This adds process.exit(0) to the benchmarks that needs it.
PR-URL: https://github.com/nodejs/node/pull/7094
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/dgram/array-vs-concat.js | 1 | ||||
-rw-r--r-- | benchmark/dgram/multi-buffer.js | 1 | ||||
-rw-r--r-- | benchmark/dgram/offset-length.js | 1 | ||||
-rw-r--r-- | benchmark/dgram/single-buffer.js | 1 | ||||
-rw-r--r-- | benchmark/fs/readfile.js | 1 | ||||
-rw-r--r-- | benchmark/http/_chunky_http_client.js | 1 | ||||
-rw-r--r-- | benchmark/http/client-request-body.js | 1 | ||||
-rw-r--r-- | benchmark/net/net-c2s-cork.js | 1 | ||||
-rw-r--r-- | benchmark/net/net-c2s.js | 1 | ||||
-rw-r--r-- | benchmark/net/net-pipe.js | 1 | ||||
-rw-r--r-- | benchmark/net/net-s2c.js | 1 | ||||
-rw-r--r-- | benchmark/net/tcp-raw-c2s.js | 1 | ||||
-rw-r--r-- | benchmark/net/tcp-raw-pipe.js | 1 | ||||
-rw-r--r-- | benchmark/net/tcp-raw-s2c.js | 1 | ||||
-rw-r--r-- | benchmark/tls/tls-connect.js | 1 |
15 files changed, 15 insertions, 0 deletions
diff --git a/benchmark/dgram/array-vs-concat.js b/benchmark/dgram/array-vs-concat.js index 2a82ea48c75..1f07a504239 100644 --- a/benchmark/dgram/array-vs-concat.js +++ b/benchmark/dgram/array-vs-concat.js @@ -67,6 +67,7 @@ function server() { var bytes = sent * len; var gbits = (bytes * 8) / (1024 * 1024 * 1024); bench.end(gbits); + process.exit(0); }, dur * 1000); }); diff --git a/benchmark/dgram/multi-buffer.js b/benchmark/dgram/multi-buffer.js index e7292feb1f9..85e9561de8c 100644 --- a/benchmark/dgram/multi-buffer.js +++ b/benchmark/dgram/multi-buffer.js @@ -58,6 +58,7 @@ function server() { var bytes = (type === 'send' ? sent : received) * len; var gbits = (bytes * 8) / (1024 * 1024 * 1024); bench.end(gbits); + process.exit(0); }, dur * 1000); }); diff --git a/benchmark/dgram/offset-length.js b/benchmark/dgram/offset-length.js index 15d9a3d0ee9..ce9f4b025ad 100644 --- a/benchmark/dgram/offset-length.js +++ b/benchmark/dgram/offset-length.js @@ -50,6 +50,7 @@ function server() { var bytes = (type === 'send' ? sent : received) * chunk.length; var gbits = (bytes * 8) / (1024 * 1024 * 1024); bench.end(gbits); + process.exit(0); }, dur * 1000); }); diff --git a/benchmark/dgram/single-buffer.js b/benchmark/dgram/single-buffer.js index 2676e0e74cf..4793f65eeab 100644 --- a/benchmark/dgram/single-buffer.js +++ b/benchmark/dgram/single-buffer.js @@ -50,6 +50,7 @@ function server() { var bytes = (type === 'send' ? sent : received) * chunk.length; var gbits = (bytes * 8) / (1024 * 1024 * 1024); bench.end(gbits); + process.exit(0); }, dur * 1000); }); diff --git a/benchmark/fs/readfile.js b/benchmark/fs/readfile.js index cdb36d065f1..f58550fae83 100644 --- a/benchmark/fs/readfile.js +++ b/benchmark/fs/readfile.js @@ -26,6 +26,7 @@ function main(conf) { setTimeout(function() { bench.end(reads); try { fs.unlinkSync(filename); } catch (e) {} + process.exit(0); }, +conf.dur * 1000); function read() { diff --git a/benchmark/http/_chunky_http_client.js b/benchmark/http/_chunky_http_client.js index bde4eed7444..d4d60ac84d1 100644 --- a/benchmark/http/_chunky_http_client.js +++ b/benchmark/http/_chunky_http_client.js @@ -81,6 +81,7 @@ function main(conf) { count += 1; if (count === num) { bench.end(count); + process.exit(0); } else { WriteHTTPHeaders(socket, 1, min + size); } diff --git a/benchmark/http/client-request-body.js b/benchmark/http/client-request-body.js index 8d7fae44c1e..f6b5ab19190 100644 --- a/benchmark/http/client-request-body.js +++ b/benchmark/http/client-request-body.js @@ -65,5 +65,6 @@ function main(conf) { function done() { bench.end(nreqs); + process.exit(0); } } diff --git a/benchmark/net/net-c2s-cork.js b/benchmark/net/net-c2s-cork.js index 5e8dd349d68..6af91620252 100644 --- a/benchmark/net/net-c2s-cork.js +++ b/benchmark/net/net-c2s-cork.js @@ -84,6 +84,7 @@ function server() { var bytes = writer.received; var gbits = (bytes * 8) / (1024 * 1024 * 1024); bench.end(gbits); + process.exit(0); }, dur * 1000); function send() { diff --git a/benchmark/net/net-c2s.js b/benchmark/net/net-c2s.js index 2c3bbe3c6a1..9b4df2f5a79 100644 --- a/benchmark/net/net-c2s.js +++ b/benchmark/net/net-c2s.js @@ -106,6 +106,7 @@ function server() { var bytes = writer.received; var gbits = (bytes * 8) / (1024 * 1024 * 1024); bench.end(gbits); + process.exit(0); }, dur * 1000); }); }); diff --git a/benchmark/net/net-pipe.js b/benchmark/net/net-pipe.js index fd3a6d4f433..03db348878e 100644 --- a/benchmark/net/net-pipe.js +++ b/benchmark/net/net-pipe.js @@ -109,6 +109,7 @@ function server() { var bytes = writer.received * 2; var gbits = (bytes * 8) / (1024 * 1024 * 1024); bench.end(gbits); + process.exit(0); }, dur * 1000); }); }); diff --git a/benchmark/net/net-s2c.js b/benchmark/net/net-s2c.js index fc3f3e13894..469b66a25a3 100644 --- a/benchmark/net/net-s2c.js +++ b/benchmark/net/net-s2c.js @@ -106,6 +106,7 @@ function server() { var bytes = writer.received; var gbits = (bytes * 8) / (1024 * 1024 * 1024); bench.end(gbits); + process.exit(0); }, dur * 1000); }); }); diff --git a/benchmark/net/tcp-raw-c2s.js b/benchmark/net/tcp-raw-c2s.js index e9dd7ca6620..c33c6d0f2ab 100644 --- a/benchmark/net/tcp-raw-c2s.js +++ b/benchmark/net/tcp-raw-c2s.js @@ -56,6 +56,7 @@ function server() { setTimeout(function() { // report in Gb/sec bench.end((bytes * 8) / (1024 * 1024 * 1024)); + process.exit(0); }, dur * 1000); clientHandle.onread = function(nread, buffer) { diff --git a/benchmark/net/tcp-raw-pipe.js b/benchmark/net/tcp-raw-pipe.js index fb8da5ea41f..b7c6776c957 100644 --- a/benchmark/net/tcp-raw-pipe.js +++ b/benchmark/net/tcp-raw-pipe.js @@ -116,6 +116,7 @@ function client() { // multiply by 2 since we're sending it first one way // then then back again. bench.end(2 * (bytes * 8) / (1024 * 1024 * 1024)); + process.exit(0); }, dur * 1000); while (clientHandle.writeQueueSize === 0) diff --git a/benchmark/net/tcp-raw-s2c.js b/benchmark/net/tcp-raw-s2c.js index a7ef40db83a..a7eeed19211 100644 --- a/benchmark/net/tcp-raw-s2c.js +++ b/benchmark/net/tcp-raw-s2c.js @@ -135,6 +135,7 @@ function client() { setTimeout(function() { // report in Gb/sec bench.end((bytes * 8) / (1024 * 1024 * 1024)); + process.exit(0); }, dur * 1000); }; } diff --git a/benchmark/tls/tls-connect.js b/benchmark/tls/tls-connect.js index a265989e04d..6ed4253f97f 100644 --- a/benchmark/tls/tls-connect.js +++ b/benchmark/tls/tls-connect.js @@ -61,4 +61,5 @@ function done() { // don't always match. Generally, serverConn will be // the smaller number, but take the min just to be sure. bench.end(Math.min(serverConn, clientConn)); + process.exit(0); } |