org.stringtemplate.v4.benchmark
Class Benchmark
java.lang.Object
org.stringtemplate.v4.benchmark.Benchmark
public class Benchmark
- extends java.lang.Object
A Java benchmark tool inspired by Caliper from google. This isn't nearly
as good but probably ok for my needs.
Use -XX:+PrintCompilation to see if compilation happens during trials
java -XX:+PrintCompilation org.stringtemplate.v4.benchmark.Benchmark MyTest
|
Method Summary |
protected static java.util.List<java.lang.Integer> |
getReps(java.util.Map<java.lang.reflect.Method,java.lang.Integer> min_reps,
java.lang.reflect.Method m)
|
static void |
main(java.lang.String[] args)
|
static void |
run(java.lang.String benchmarkClassName)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIN_BENCHMARK_TIME_IN_MS
public static final int MIN_BENCHMARK_TIME_IN_MS
- See Also:
- Constant Field Values
MAX_ERROR_IN_WORK_PER_MS
public static final double MAX_ERROR_IN_WORK_PER_MS
- See Also:
- Constant Field Values
Benchmark
public Benchmark()
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
run
public static void run(java.lang.String benchmarkClassName)
throws java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.net.UnknownHostException,
java.lang.reflect.InvocationTargetException
- Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.net.UnknownHostException
java.lang.reflect.InvocationTargetException
getReps
protected static java.util.List<java.lang.Integer> getReps(java.util.Map<java.lang.reflect.Method,java.lang.Integer> min_reps,
java.lang.reflect.Method m)