http2: improve http2 code a bit · nodejs/node@b095e35 · GitHub
Skip to content

Commit b095e35

Browse files
jasnellBethGriggs
authored andcommitted
http2: improve http2 code a bit
Multiple general improvements to http2 internals for readability and efficiency [This backport applied to v10.x cleanly but had several merge conflicts on v8.x.] PR-URL: #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>
1 parent 07458ba commit b095e35

5 files changed

Lines changed: 152 additions & 135 deletions

File tree

benchmark/http2/headers.js

Lines changed: 1 addition & 2 deletions

benchmark/http2/respond-with-fd.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ const fs = require('fs');
88
const file = path.join(path.resolve(__dirname, '../fixtures'), 'alice.html');
99

1010
const bench = common.createBenchmark(main, {
11-
requests: [100, 1000, 10000, 100000, 1000000],
12-
streams: [100, 200, 1000],
13-
clients: [1, 2],
11+
requests: [100, 1000, 5000],
12+
streams: [1, 10, 20, 40, 100, 200],
13+
clients: [2],
1414
benchmarker: ['h2load']
1515
}, { flags: ['--no-warnings', '--expose-http2'] });
1616

benchmark/http2/simple.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ const fs = require('fs');
99
const file = path.join(path.resolve(__dirname, '../fixtures'), 'alice.html');
1010

1111
const bench = common.createBenchmark(main, {
12-
requests: [100, 1000, 10000, 100000],
13-
streams: [100, 200, 1000],
14-
clients: [1, 2],
12+
requests: [100, 1000, 5000],
13+
streams: [1, 10, 20, 40, 100, 200],
14+
clients: [2],
1515
benchmarker: ['h2load']
1616
}, { flags: ['--no-warnings', '--expose-http2'] });
1717

lib/internal/http2/util.js

Lines changed: 25 additions & 19 deletions

0 commit comments

Comments
 (0)