Skip to content
Permalink
Browse files

benchmark: fix http headers benchmark

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 Mar 30, 2019
1 parent 47f5cc1 commit 29d0b4342654eeb76a6cd429298d988a59733bf6
Showing with 3 additions and 1 deletion.
  1. +3 −1 benchmark/http/headers.js
@@ -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}`);

0 comments on commit 29d0b43

Please sign in to comment.
You can’t perform that action at this time.