@@ -87,6 +87,11 @@ public static void main(String[] args) throws Exception {
87
87
intervalMonitor = Integer .parseInt (argsLine .getOptionValue ("im" ));
88
88
}
89
89
90
+ Boolean useVirtualThreads = false ;
91
+ if (argsLine .hasOption ("vt" )) {
92
+ useVirtualThreads = Boolean .parseBoolean (argsLine .getOptionValue ("vt" ));
93
+ }
94
+
90
95
// -------------------------------------------------------------------
91
96
// GET PLUGIN LIST
92
97
// -------------------------------------------------------------------
@@ -459,7 +464,7 @@ public static void main(String[] args) throws Exception {
459
464
if (isBooleanOptionSet (argsLine , "execute" )) {
460
465
// Bombs away!
461
466
try {
462
- Results r = runWorkload (benchList , intervalMonitor );
467
+ Results r = runWorkload (benchList , intervalMonitor , useVirtualThreads );
463
468
writeOutputs (r , activeTXTypes , argsLine , xmlConfig );
464
469
writeHistograms (r );
465
470
@@ -631,7 +636,7 @@ private static void runLoader(BenchmarkModule bench) throws SQLException, Interr
631
636
bench .loadDatabase ();
632
637
}
633
638
634
- private static Results runWorkload (List <BenchmarkModule > benchList , int intervalMonitor ) throws IOException {
639
+ private static Results runWorkload (List <BenchmarkModule > benchList , int intervalMonitor , Boolean useVirtualThreads ) throws IOException {
635
640
List <Worker <?>> workers = new ArrayList <>();
636
641
List <WorkloadConfiguration > workConfs = new ArrayList <>();
637
642
for (BenchmarkModule bench : benchList ) {
@@ -643,7 +648,7 @@ private static Results runWorkload(List<BenchmarkModule> benchList, int interval
643
648
workConfs .add (bench .getWorkloadConfiguration ());
644
649
645
650
}
646
- Results r = ThreadBench .runRateLimitedBenchmark (workers , workConfs , intervalMonitor );
651
+ Results r = ThreadBench .runRateLimitedBenchmark (workers , workConfs , intervalMonitor , useVirtualThreads );
647
652
LOG .info (SINGLE_LINE );
648
653
LOG .info ("Rate limited reqs/s: {}" , r );
649
654
return r ;
0 commit comments