summaryrefslogtreecommitdiff
path: root/benchmark/http2
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-01-23 13:18:55 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2018-02-01 10:49:03 +0100
commit1178670cca16a268162aaf39afeb933779988d22 (patch)
treea3773ace6931745c032dd32a55309d7f43e9a5de /benchmark/http2
parent2072f343ad5c7f8a74e480c625b5b4df3d071bf1 (diff)
downloadandroid-node-v8-1178670cca16a268162aaf39afeb933779988d22.tar.gz
android-node-v8-1178670cca16a268162aaf39afeb933779988d22.tar.bz2
android-node-v8-1178670cca16a268162aaf39afeb933779988d22.zip
benchmark: (http(2)) refactor
PR-URL: https://github.com/nodejs/node/pull/18320 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'benchmark/http2')
-rw-r--r--benchmark/http2/respond-with-fd.js3
-rw-r--r--benchmark/http2/simple.js5
-rw-r--r--benchmark/http2/write.js3
3 files changed, 3 insertions, 8 deletions
diff --git a/benchmark/http2/respond-with-fd.js b/benchmark/http2/respond-with-fd.js
index 6076cf91be..fa7b2fbd16 100644
--- a/benchmark/http2/respond-with-fd.js
+++ b/benchmark/http2/respond-with-fd.js
@@ -1,7 +1,6 @@
'use strict';
const common = require('../common.js');
-const PORT = common.PORT;
const path = require('path');
const fs = require('fs');
@@ -25,7 +24,7 @@ function main({ requests, streams, clients }) {
stream.respondWithFD(fd);
stream.on('error', (err) => {});
});
- server.listen(PORT, () => {
+ server.listen(common.PORT, () => {
bench.http({
path: '/',
requests,
diff --git a/benchmark/http2/simple.js b/benchmark/http2/simple.js
index 37c78d3401..cf017e6735 100644
--- a/benchmark/http2/simple.js
+++ b/benchmark/http2/simple.js
@@ -1,11 +1,8 @@
'use strict';
const common = require('../common.js');
-const PORT = common.PORT;
-
const path = require('path');
const fs = require('fs');
-
const file = path.join(path.resolve(__dirname, '../fixtures'), 'alice.html');
const bench = common.createBenchmark(main, {
@@ -24,7 +21,7 @@ function main({ requests, streams, clients }) {
out.pipe(stream);
stream.on('error', (err) => {});
});
- server.listen(PORT, () => {
+ server.listen(common.PORT, () => {
bench.http({
path: '/',
requests,
diff --git a/benchmark/http2/write.js b/benchmark/http2/write.js
index 7a802ef84f..6fcb1254ca 100644
--- a/benchmark/http2/write.js
+++ b/benchmark/http2/write.js
@@ -1,7 +1,6 @@
'use strict';
const common = require('../common.js');
-const PORT = common.PORT;
const bench = common.createBenchmark(main, {
streams: [100, 200, 1000],
@@ -26,7 +25,7 @@ function main({ streams, length, size }) {
}
write();
});
- server.listen(PORT, () => {
+ server.listen(common.PORT, () => {
bench.http({
path: '/',
requests: 10000,