mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00
benchmark: (http) use destructuring
PR-URL: https://github.com/nodejs/node/pull/18250 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
fd45187d34
commit
a52878c239
10 changed files with 24 additions and 42 deletions
|
@ -8,10 +8,7 @@ const bench = common.createBenchmark(main, {
|
|||
n: [1e6]
|
||||
});
|
||||
|
||||
function main(conf) {
|
||||
const len = +conf.len;
|
||||
const n = +conf.n;
|
||||
|
||||
function main({ len, n }) {
|
||||
const path = '/'.repeat(len);
|
||||
const opts = { path: path, createConnection: function() {} };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue