summaryrefslogtreecommitdiff
path: root/benchmark/module/module-loader.js
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/module/module-loader.js')
-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();