Skip to content

Commit

Permalink
benchmark: add --expose_internals switch
Browse files Browse the repository at this point in the history
Adds --expose_internals switch to benchmark runner. This makes
misc/freelist.js benchmark run properly
  • Loading branch information
bzoz committed Sep 16, 2016
1 parent 3c23db4 commit 167b1e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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;
var n = conf.n;
var poolSize = 1000;
var list = new FreeList('test', poolSize, Object);
Expand Down

0 comments on commit 167b1e6

Please sign in to comment.