mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00
benchmark: var to const
PR-URL: https://github.com/nodejs/node/pull/13757 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
parent
b1c8f15c5f
commit
e167ab71fb
120 changed files with 682 additions and 682 deletions
|
@ -1,19 +1,19 @@
|
|||
'use strict';
|
||||
|
||||
var common = require('../common.js');
|
||||
var ClientRequest = require('http').ClientRequest;
|
||||
const common = require('../common.js');
|
||||
const ClientRequest = require('http').ClientRequest;
|
||||
|
||||
var bench = common.createBenchmark(main, {
|
||||
const bench = common.createBenchmark(main, {
|
||||
len: [1, 8, 16, 32, 64, 128],
|
||||
n: [1e6]
|
||||
});
|
||||
|
||||
function main(conf) {
|
||||
var len = +conf.len;
|
||||
var n = +conf.n;
|
||||
const len = +conf.len;
|
||||
const n = +conf.n;
|
||||
|
||||
var path = '/'.repeat(len);
|
||||
var opts = { path: path, createConnection: function() {} };
|
||||
const path = '/'.repeat(len);
|
||||
const opts = { path: path, createConnection: function() {} };
|
||||
|
||||
bench.start();
|
||||
for (var i = 0; i < n; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue