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:
Ruben Bridgewater 2017-12-30 03:57:46 +01:00
parent fd45187d34
commit a52878c239
No known key found for this signature in database
GPG key ID: F07496B3EB3C1762
10 changed files with 24 additions and 42 deletions

View file

@ -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() {} };