@@ -87,6 +87,11 @@ public static void main(String[] args) throws Exception {
8787 intervalMonitor = Integer .parseInt (argsLine .getOptionValue ("im" ));
8888 }
8989
90+ Boolean useVirtualThreads = false ;
91+ if (argsLine .hasOption ("vt" )) {
92+ useVirtualThreads = Boolean .parseBoolean (argsLine .getOptionValue ("vt" ));
93+ }
94+
9095 // -------------------------------------------------------------------
9196 // GET PLUGIN LIST
9297 // -------------------------------------------------------------------
@@ -459,7 +464,7 @@ public static void main(String[] args) throws Exception {
459464 if (isBooleanOptionSet (argsLine , "execute" )) {
460465 // Bombs away!
461466 try {
462- Results r = runWorkload (benchList , intervalMonitor );
467+ Results r = runWorkload (benchList , intervalMonitor , useVirtualThreads );
463468 writeOutputs (r , activeTXTypes , argsLine , xmlConfig );
464469 writeHistograms (r );
465470
@@ -631,7 +636,7 @@ private static void runLoader(BenchmarkModule bench) throws SQLException, Interr
631636 bench .loadDatabase ();
632637 }
633638
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 {
635640 List <Worker <?>> workers = new ArrayList <>();
636641 List <WorkloadConfiguration > workConfs = new ArrayList <>();
637642 for (BenchmarkModule bench : benchList ) {
@@ -643,7 +648,7 @@ private static Results runWorkload(List<BenchmarkModule> benchList, int interval
643648 workConfs .add (bench .getWorkloadConfiguration ());
644649
645650 }
646- Results r = ThreadBench .runRateLimitedBenchmark (workers , workConfs , intervalMonitor );
651+ Results r = ThreadBench .runRateLimitedBenchmark (workers , workConfs , intervalMonitor , useVirtualThreads );
647652 LOG .info (SINGLE_LINE );
648653 LOG .info ("Rate limited reqs/s: {}" , r );
649654 return r ;
0 commit comments