test: run misc benchmark only once in tests
Prevent misc benchmark files from running more than one benchmark during tests. PR-URL: https://github.com/nodejs/node/pull/21046 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
parent
8944a4f162
commit
5d4c5d3f71
@ -9,6 +9,10 @@ const bench = common.createBenchmark(main, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function main({ n, type }) {
|
function main({ n, type }) {
|
||||||
|
// Default value for tests.
|
||||||
|
if (type === '')
|
||||||
|
type = 'extend';
|
||||||
|
|
||||||
let fn;
|
let fn;
|
||||||
if (type === 'extend') {
|
if (type === 'extend') {
|
||||||
fn = util._extend;
|
fn = util._extend;
|
||||||
|
@ -9,6 +9,6 @@ runBenchmark('misc', [
|
|||||||
'dur=0.1',
|
'dur=0.1',
|
||||||
'method=',
|
'method=',
|
||||||
'n=1',
|
'n=1',
|
||||||
'type=extend',
|
'type=',
|
||||||
'val=magyarország.icom.museum'
|
'val=magyarország.icom.museum',
|
||||||
], { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
], { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user