summaryrefslogtreecommitdiff
path: root/benchmark/module
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2017-09-13 22:48:53 -0300
committerRuben Bridgewater <ruben@bridgewater.de>2017-09-19 21:14:38 -0300
commite167ab71fb113fa38866dd11aa99af7079fb463c (patch)
tree3d91ca0f6e60d08fcab70833b851335e41b53cd0 /benchmark/module
parentb1c8f15c5f169e021f7c46eb7b219de95fe97603 (diff)
downloadnode-new-e167ab71fb113fa38866dd11aa99af7079fb463c.tar.gz
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>
Diffstat (limited to 'benchmark/module')
-rw-r--r--benchmark/module/module-loader.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/benchmark/module/module-loader.js b/benchmark/module/module-loader.js
index 7c72ac1d5c..d40e36dc3e 100644
--- a/benchmark/module/module-loader.js
+++ b/benchmark/module/module-loader.js
@@ -1,19 +1,19 @@
'use strict';
-var fs = require('fs');
-var path = require('path');
-var common = require('../common.js');
+const fs = require('fs');
+const path = require('path');
+const common = require('../common.js');
-var tmpDirectory = path.join(__dirname, '..', 'tmp');
-var benchmarkDirectory = path.join(tmpDirectory, 'nodejs-benchmark-module');
+const tmpDirectory = path.join(__dirname, '..', 'tmp');
+const benchmarkDirectory = path.join(tmpDirectory, 'nodejs-benchmark-module');
-var bench = common.createBenchmark(main, {
+const bench = common.createBenchmark(main, {
thousands: [50],
fullPath: ['true', 'false'],
useCache: ['true', 'false']
});
function main(conf) {
- var n = +conf.thousands * 1e3;
+ const n = +conf.thousands * 1e3;
rmrf(tmpDirectory);
try { fs.mkdirSync(tmpDirectory); } catch (e) {}
@@ -69,7 +69,7 @@ function measureDir(n, useCache) {
function rmrf(location) {
try {
- var things = fs.readdirSync(location);
+ const things = fs.readdirSync(location);
things.forEach(function(thing) {
var cur = path.join(location, thing),
isDirectory = fs.statSync(cur).isDirectory();