hawk9821 commented on code in PR #13761:
URL: https://github.com/apache/seatunnel/pull/13761#discussion_r4740471912


##########
seatunnel-benchmarks/src/main/java/org/apache/seatunnel/benchmark/IncrementalSourceRecordEmitterBenchmark.java:
##########
@@ -59,11 +62,14 @@ public class IncrementalSourceRecordEmitterBenchmark 
extends BenchmarkBase {
 
     private IncrementalSourceRecordEmitterFixture fixture;
 
-    public static void main(String[] args) throws IOException {
-        String[] options = new String[args.length + 1];
-        options[0] = 
IncrementalSourceRecordEmitterBenchmark.class.getCanonicalName();
-        System.arraycopy(args, 0, options, 1, args.length);
-        Main.main(options);
+    public static void main(String[] args) throws RunnerException {
+        Options options =
+                new OptionsBuilder()
+                        .verbosity(VerboseMode.NORMAL)

Review Comment:
   This silently drops `args`, a regression from the previous 
`Main.main(options)` forwarding. Either forward args via 
`OptionsBuilder.parent(new CommandLineOptions(args))` or fail fast on non-empty 
args.
   
   Suggested fix (JMH 1.37 compatible):
   
   ```java
   public static void main(String[] args) throws RunnerException, 
CommandLineOptionException {
       Options options =
               new OptionsBuilder()
                       .parent(new CommandLineOptions(args))   // CLI args as 
defaults
                       .verbosity(VerboseMode.NORMAL)
                       
.include(IncrementalSourceRecordEmitterBenchmark.class.getCanonicalName())
                       .build();
       new Runner(options).run();
   }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to