benchmark: set maxHeaderListPairs in h2 headers.js
PR-URL: https://github.com/nodejs/node/pull/17194 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
3e29e0126e
commit
f5352b3f32
@ -13,7 +13,9 @@ function main(conf) {
|
|||||||
const n = +conf.n;
|
const n = +conf.n;
|
||||||
const nheaders = +conf.nheaders;
|
const nheaders = +conf.nheaders;
|
||||||
const http2 = require('http2');
|
const http2 = require('http2');
|
||||||
const server = http2.createServer();
|
const server = http2.createServer({
|
||||||
|
maxHeaderListPairs: 20000
|
||||||
|
});
|
||||||
|
|
||||||
const headersObject = {
|
const headersObject = {
|
||||||
':path': '/',
|
':path': '/',
|
||||||
@ -34,7 +36,9 @@ function main(conf) {
|
|||||||
stream.end('Hi!');
|
stream.end('Hi!');
|
||||||
});
|
});
|
||||||
server.listen(PORT, () => {
|
server.listen(PORT, () => {
|
||||||
const client = http2.connect(`http://localhost:${PORT}/`);
|
const client = http2.connect(`http://localhost:${PORT}/`, {
|
||||||
|
maxHeaderListPairs: 20000
|
||||||
|
});
|
||||||
|
|
||||||
function doRequest(remaining) {
|
function doRequest(remaining) {
|
||||||
const req = client.request(headersObject);
|
const req = client.request(headersObject);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user