Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion benchmark/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/misc/freelist.js
Original file line number Diff line number Diff line change
@@ -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;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's up with this? Maybe add a comment?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

require was moved there, so it will work with adding -expose_internals only in common.js. It was the result of discusion here: #8547 (review)

var n = conf.n;
var poolSize = 1000;
var list = new FreeList('test', poolSize, Object);
Expand Down