
jmh.Jmh Maven / Gradle / Ivy
The newest version!
package jmh;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
public class Jmh {
private static void runTest() throws RunnerException {
System.out.println(">>>>MpJmhTest>>>>>>>>");
Object d= new MpJmhTest().getById();
System.out.println(d);
System.out.println(">>>>FlexJmhTest>>>>>>>>");
new FlexJmhTest().getById();
System.out.println(">>>>PlusJmhTest>>>>>>>>");
new PlusJmhTest().getById();
}
private static void runTest2() throws RunnerException {
System.out.println(">>>>MpJmhTest>>>>>>>>");
Object d= new MpJmhTest().sql();
System.out.println(d);
System.out.println(">>>>FlexJmhTest>>>>>>>>");
d=new FlexJmhTest().sql();
System.out.println(d);
}
private static void runJmh() throws RunnerException {
Options opt = new OptionsBuilder()
//.include(MpJmhTest.class.getSimpleName())
//.include(FlexJmhTest.class.getSimpleName())
//.include(PlusJmhTest.class.getSimpleName())
.include("sql")
//.exclude(PlusJmhTest.class.getSimpleName())
//.exclude(FlexJmhTest.class.getSimpleName())
.build();
new Runner(opt).run();
}
public static void main(String[] args) throws RunnerException {
runTest2();
runJmh();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy