diff --git a/benchmark/common.js b/benchmark/common.js index adc04a0b8082f9..495d6fdf365871 100644 --- a/benchmark/common.js +++ b/benchmark/common.js @@ -137,7 +137,8 @@ Benchmark.prototype._run = function() { } const child = child_process.fork(require.main.filename, childArgs, { - env: childEnv + env: childEnv, + execArgv: ['--expose_internals'].concat(process.execArgv) }); child.on('message', sendResult); child.on('close', function(code) { diff --git a/benchmark/misc/freelist.js b/benchmark/misc/freelist.js index 7956dc3d6b18c0..868d42753ae6d1 100644 --- a/benchmark/misc/freelist.js +++ b/benchmark/misc/freelist.js @@ -1,13 +1,13 @@ 'use strict'; var common = require('../common.js'); -var FreeList = require('internal/freelist').FreeList; var bench = common.createBenchmark(main, { n: [100000] }); function main(conf) { + const FreeList = require('internal/freelist').FreeList; var n = conf.n; var poolSize = 1000; var list = new FreeList('test', poolSize, Object);