diff options
Diffstat (limited to 'benchmark/_http-benchmarkers.js')
-rw-r--r-- | benchmark/_http-benchmarkers.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/benchmark/_http-benchmarkers.js b/benchmark/_http-benchmarkers.js index f456628454..a4d6230039 100644 --- a/benchmark/_http-benchmarkers.js +++ b/benchmark/_http-benchmarkers.js @@ -25,8 +25,11 @@ class AutocannonBenchmarker { '-c', options.connections, '-j', '-n', - `http://127.0.0.1:${options.port}${options.path}`, ]; + for (const field in options.headers) { + args.push('-H', `${field}=${options.headers[field]}`); + } + args.push(`http://127.0.0.1:${options.port}${options.path}`); const child = child_process.spawn(this.executable, args); return child; } |