Skip to content

Commit

Permalink
benchmark: set maxHeaderListPairs in h2 headers.js
Browse files Browse the repository at this point in the history
PR-URL: #17194
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
apapirovski authored and MylesBorins committed Dec 11, 2017
1 parent 2bbc1f0 commit b16d570
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions benchmark/http2/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ function main(conf) {
const n = +conf.n;
const nheaders = +conf.nheaders;
const http2 = require('http2');
const server = http2.createServer();
const server = http2.createServer({
maxHeaderListPairs: 20000
});

const headersObject = {
':path': '/',
Expand All @@ -34,7 +36,9 @@ function main(conf) {
stream.end('Hi!');
});
server.listen(PORT, () => {
const client = http2.connect(`http://localhost:${PORT}/`);
const client = http2.connect(`http://localhost:${PORT}/`, {
maxHeaderListPairs: 20000
});

function doRequest(remaining) {
const req = client.request(headersObject);
Expand Down

0 comments on commit b16d570

Please sign in to comment.