use of org.openjdk.jmh.runner.NoBenchmarksException in project h2o-3 by h2oai.
the class H2OResultFormat method main.
/**
* Copy of {@link org.openjdk.jmh.Main#main(java.lang.String[])}
*
* @param args command line parameters
*/
public static void main(String[] args) {
// Try to run benchmark and collect results
try {
CommandLineOptions cmdOptions = new CommandLineOptions(args);
Runner runner = new Runner(cmdOptions);
Collection<RunResult> results = null;
try {
results = runner.run();
// Bench code passed so report results
if (H2O_UBENCH_REPORT_FILE != null) {
// Create an output directory
File ubenchReportFile = new File(H2O_UBENCH_REPORT_FILE);
getResultFormater(ubenchReportFile).writeOut(results);
}
} catch (NoBenchmarksException e) {
System.err.println("No matching benchmarks. Miss-spelled regexp?");
if (cmdOptions.verbosity().orElse(Defaults.VERBOSITY) != VerboseMode.EXTRA) {
System.err.println("Use " + VerboseMode.EXTRA + " verbose mode to debug the pattern matching.");
} else {
runner.list();
}
System.exit(1);
} catch (ProfilersFailedException e) {
// This is not exactly an error, set non-zero exit code
System.err.println(e.getMessage());
System.exit(1);
} catch (RunnerException e) {
System.err.print("ERROR: ");
e.printStackTrace(System.err);
System.exit(1);
}
} catch (CommandLineOptionException e) {
System.err.println("Error parsing command line:");
System.err.println(" " + e.getMessage());
System.exit(1);
}
}
Aggregations