Skip to content

Commit

Permalink
benchmark: fix http headers benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
apapirovski committed Apr 6, 2019
1 parent a8e8d52 commit 4409bf2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion benchmark/http/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ function main({ len, n }) {
'Transfer-Encoding': 'chunked',
};

const Is = [ ...Array(n / len).keys() ];
// TODO(BridgeAR): Change this benchmark to use grouped arguments when
// implemented. https://github.com/nodejs/node/issues/26425
const Is = [ ...Array(Math.max(n / len, 1)).keys() ];
const Js = [ ...Array(len).keys() ];
for (const i of Is) {
headers[`foo${i}`] = Js.map(() => `some header value ${i}`);
Expand Down

0 comments on commit 4409bf2

Please sign in to comment.