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 <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
apapirovski authored and gibfahn committed Dec 19, 2017
1 parent 1053108 commit bf84ed0
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 bf84ed0

Please sign in to comment.