summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorAndreas Madsen <amwebdk@gmail.com>2016-05-31 21:49:16 +0200
committerAndreas Madsen <amwebdk@gmail.com>2016-07-26 13:21:50 +0200
commit8bb59fdb127b060d38430c0428d7783931ebec6e (patch)
treefb0ba5c611c27b19480c11349283030cf463d986 /benchmark
parentf99471b2ae147fbb072223be62e9100862379dc8 (diff)
downloadandroid-node-v8-8bb59fdb127b060d38430c0428d7783931ebec6e.tar.gz
android-node-v8-8bb59fdb127b060d38430c0428d7783931ebec6e.tar.bz2
android-node-v8-8bb59fdb127b060d38430c0428d7783931ebec6e.zip
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.js1
-rw-r--r--benchmark/dgram/multi-buffer.js1
-rw-r--r--benchmark/dgram/offset-length.js1
-rw-r--r--benchmark/dgram/single-buffer.js1
-rw-r--r--benchmark/fs/readfile.js1
-rw-r--r--benchmark/http/_chunky_http_client.js1
-rw-r--r--benchmark/http/client-request-body.js1
-rw-r--r--benchmark/net/net-c2s-cork.js1
-rw-r--r--benchmark/net/net-c2s.js1
-rw-r--r--benchmark/net/net-pipe.js1
-rw-r--r--benchmark/net/net-s2c.js1
-rw-r--r--benchmark/net/tcp-raw-c2s.js1
-rw-r--r--benchmark/net/tcp-raw-pipe.js1
-rw-r--r--benchmark/net/tcp-raw-s2c.js1
-rw-r--r--benchmark/tls/tls-connect.js1
15 files changed, 15 insertions, 0 deletions
diff --git a/benchmark/dgram/array-vs-concat.js b/benchmark/dgram/array-vs-concat.js
index 2a82ea48c7..1f07a50423 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 e7292feb1f..85e9561de8 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 15d9a3d0ee..ce9f4b025a 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 2676e0e74c..4793f65eea 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 cdb36d065f..f58550fae8 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 bde4eed744..d4d60ac84d 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 8d7fae44c1..f6b5ab1919 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 5e8dd349d6..6af9162025 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 2c3bbe3c6a..9b4df2f5a7 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 fd3a6d4f43..03db348878 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 fc3f3e1389..469b66a25a 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 e9dd7ca662..c33c6d0f2a 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 fb8da5ea41..b7c6776c95 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 a7ef40db83..a7eeed1921 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 a265989e04..6ed4253f97 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);
}