-
Notifications
You must be signed in to change notification settings - Fork 108
ProjectHome
Colin Decker edited this page May 19, 2015
·
1 revision
Caliper is Google's open-source framework for writing, running and viewing the results of JavaMicrobenchmarks.
The latest release is 1.0-beta-1
. It can be downloaded as a single uberjar or referenced as a maven dependency:
<dependency>
<groupId>com.google.caliper</groupId>
<artifactId>caliper</artifactId>
<version>1.0-beta-1</version>
</dependency>
The simplest complete Caliper benchmark looks like this:
public class MyBenchmark extends Benchmark {
public void timeMyOperation(int reps) {
for (int i = 0; i < reps; i++) {
MyClass.myOperation();
}
}
}
Best viewed in YouTube @ 1080p
A discussion of the design and methodology employed by caliper can be found in the Caliper Design Document.