File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -737,9 +737,16 @@ class Benchmark {
737
737
return tags . some ( ( tag ) => this . tags . has ( tag . toLowerCase ( ) ) ) ;
738
738
}
739
739
740
+ get benchmarkArguments ( ) {
741
+ return {
742
+ ...this . plan . arguments ,
743
+ iterationCount : this . iterations ,
744
+ } ;
745
+ }
746
+
740
747
get runnerCode ( ) {
741
748
return `{
742
- const benchmark = new Benchmark(${ this . iterations } );
749
+ const benchmark = new Benchmark(${ JSON . stringify ( this . benchmarkArguments ) } );
743
750
const results = [];
744
751
const benchmarkName = "${ this . name } ";
745
752
@@ -1400,7 +1407,7 @@ class WSLBenchmark extends Benchmark {
1400
1407
1401
1408
get runnerCode ( ) {
1402
1409
return `{
1403
- const benchmark = new Benchmark();
1410
+ const benchmark = new Benchmark(${ JSON . stringify ( this . benchmarkArguments ) } );
1404
1411
const benchmarkName = "${ this . name } ";
1405
1412
1406
1413
const results = [];
Original file line number Diff line number Diff line change 25
25
"use strict" ;
26
26
27
27
class Benchmark {
28
- constructor ( verbose = 0 )
28
+ constructor ( { verbose = 0 } )
29
29
{
30
30
this . _verbose = verbose ;
31
31
}
You can’t perform that action at this time.
0 commit comments