Skip to content
This repository has been archived by the owner on Nov 28, 2020. It is now read-only.

Commit

Permalink
benchmarking: fix runtime regression for require.cache (#257)
Browse files Browse the repository at this point in the history
Reported regression was due to underlying runner.runBenchmarks()
function. Workaround is to revert the order of functions require.new
and require.cache.

PR-URL: #257
Fixes: #202
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
  • Loading branch information
uttampawar authored and mhdawson committed Jan 22, 2019
1 parent 214aeef commit a310c95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions experimental/benchmarks/node-api/require/require.perf.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ if (module === require.main) {
}

function runBenchmarks(count) {
runner.runBenchmarks('require.new', function(suite) {
runner.buildNTests(count, 'require.new', suite, newRequire);
});
runner.runBenchmarks('require.cached', function(suite) {
runner.buildNTests(count, 'require.cached', suite, cachedRequire);
});
runner.runBenchmarks('require.new', function(suite) {
runner.buildNTests(count, 'require.new', suite, newRequire);
});
}

module.exports = runBenchmarks;
Expand Down

0 comments on commit a310c95

Please sign in to comment.