diff options
author | Denys Otrishko <shishugi@gmail.com> | 2020-01-30 20:08:38 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2020-02-03 06:45:02 +0300 |
commit | f7a1ef6fb51f814223e3c26fffb9d39b08f91b1b (patch) | |
tree | 5eed8924bf454375c9b22345b6a77582c6cbe5cf /benchmark/http/set_header.js | |
parent | dbaa4ca166a5da08f933ec99eee5f41b740bd13c (diff) |
benchmark: clean up config resolution in multiple benchmarks
This removes 'to Number' casting in multiple benchmarks (which is
handled by the benchmark runner) and cleans up some var usage in changed
benchmarks.
PR-URL: https://github.com/nodejs/node/pull/31581
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'benchmark/http/set_header.js')
-rw-r--r-- | benchmark/http/set_header.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/benchmark/http/set_header.js b/benchmark/http/set_header.js index 470d4b00818..f2236696f1c 100644 --- a/benchmark/http/set_header.js +++ b/benchmark/http/set_header.js @@ -16,10 +16,7 @@ const bench = common.createBenchmark(main, { n: [1e6], }); -function main(conf) { - const n = +conf.n; - const value = conf.value; - +function main({ n, value }) { const og = new OutgoingMessage(); bench.start(); |