diff options
author | James M Snell <jasnell@gmail.com> | 2018-10-30 16:17:33 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-11-03 19:38:24 -0700 |
commit | 7825045ee695e9e5c048133255a3b614e04c98d3 (patch) | |
tree | 82279a1f9e740a1bcf9086b61ce04cb4aa2d4040 /benchmark | |
parent | ab2778d76368c240764c931404fa3c7f25aaa309 (diff) | |
download | android-node-v8-7825045ee695e9e5c048133255a3b614e04c98d3.tar.gz android-node-v8-7825045ee695e9e5c048133255a3b614e04c98d3.tar.bz2 android-node-v8-7825045ee695e9e5c048133255a3b614e04c98d3.zip |
http2: improve http2 code a bit
Multiple general improvements to http2 internals for
readability and efficiency
PR-URL: https://github.com/nodejs/node/pull/23984
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/http2/headers.js | 3 | ||||
-rw-r--r-- | benchmark/http2/respond-with-fd.js | 6 | ||||
-rw-r--r-- | benchmark/http2/simple.js | 6 |
3 files changed, 7 insertions, 8 deletions
diff --git a/benchmark/http2/headers.js b/benchmark/http2/headers.js index e2fad2ea02..f18a73b95e 100644 --- a/benchmark/http2/headers.js +++ b/benchmark/http2/headers.js @@ -39,8 +39,7 @@ function main({ n, nheaders }) { function doRequest(remaining) { const req = client.request(headersObject); - req.end(); - req.on('data', () => {}); + req.resume(); req.on('end', () => { if (remaining > 0) { doRequest(remaining - 1); diff --git a/benchmark/http2/respond-with-fd.js b/benchmark/http2/respond-with-fd.js index 3415a9c69f..35856490f7 100644 --- a/benchmark/http2/respond-with-fd.js +++ b/benchmark/http2/respond-with-fd.js @@ -7,9 +7,9 @@ const fs = require('fs'); const file = path.join(path.resolve(__dirname, '../fixtures'), 'alice.html'); const bench = common.createBenchmark(main, { - requests: [100, 1000, 10000, 100000], - streams: [100, 200, 1000], - clients: [1, 2], + requests: [100, 1000, 5000], + streams: [1, 10, 20, 40, 100, 200], + clients: [2], benchmarker: ['h2load'] }, { flags: ['--no-warnings'] }); diff --git a/benchmark/http2/simple.js b/benchmark/http2/simple.js index f4598b8156..aab7c6b609 100644 --- a/benchmark/http2/simple.js +++ b/benchmark/http2/simple.js @@ -6,9 +6,9 @@ const fs = require('fs'); const file = path.join(path.resolve(__dirname, '../fixtures'), 'alice.html'); const bench = common.createBenchmark(main, { - requests: [100, 1000, 10000, 100000], - streams: [100, 200, 1000], - clients: [1, 2], + requests: [100, 1000, 5000], + streams: [1, 10, 20, 40, 100, 200], + clients: [2], benchmarker: ['h2load'] }, { flags: ['--no-warnings'] }); |