Skip to content

Commit f5bb495

Browse files
zhengyu123zhengyu.gu
andauthored
Relax benchmark commandline restriction (#243)
* Relax benchmark commandline restriction * v2 --------- Co-authored-by: zhengyu.gu <zhengyu.gu@servicenow.com>
1 parent f36444e commit f5bb495

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

ddprof-stresstest/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ task runStressTests(type: Exec) {
3939
}
4040
group = 'Execution'
4141
description = 'Run JMH stresstests'
42-
commandLine "${javaHome}/bin/java", '-jar', 'build/libs/stresstests.jar', 'counters.*'
42+
commandLine "${javaHome}/bin/java", '-jar', 'build/libs/stresstests.jar', '-prof', 'com.datadoghq.profiler.stresstest.WhiteboxProfiler', 'counters.*'
4343
}
4444

4545
tasks.withType(JavaCompile).configureEach {

ddprof-stresstest/src/jmh/java/com/datadoghq/profiler/stresstest/Main.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,10 @@ public class Main {
1616
public static final String SCENARIOS_PACKAGE = "com.datadoghq.profiler.stresstest.scenarios.";
1717

1818
public static void main(String... args) throws Exception {
19-
String filter = "*";
20-
if (args.length == 1) {
21-
filter = args[0];
22-
} else if (args.length > 1) {
23-
System.err.println("Usage: java -jar ddprof-stresstest.jar [scenario filter]");
24-
System.exit(1);
25-
}
2619
CommandLineOptions commandLineOptions = new CommandLineOptions(args);
2720
Mode mode = Mode.AverageTime;
2821
Options options = new OptionsBuilder()
2922
.parent(new CommandLineOptions(args))
30-
.include(SCENARIOS_PACKAGE + filter)
31-
.addProfiler(WhiteboxProfiler.class)
3223
.forks(commandLineOptions.getForkCount().orElse(1))
3324
.warmupIterations(commandLineOptions.getWarmupIterations().orElse(0))
3425
.measurementIterations(commandLineOptions.getMeasurementIterations().orElse(1))

0 commit comments

Comments
 (0)