Skip to content

Commit

Permalink
benchmark: fix http headers benchmark
Browse files Browse the repository at this point in the history
PR-URL: #27021
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
apapirovski authored and danbev committed Apr 11, 2019
1 parent 47f5cc1 commit 29d0b43
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 29d0b43

Please sign in to comment.