This answer is now obsolete. Caliper has worked in Windows for more than a year, at least: https://code.google.com/p/caliper/issues/detail?id=167
Caliper doesn't work in Windows. See this case. You need to use version 0.5-rc1, which has other issues but is still pretty okay and is missing a lot of features, but it does work in Windows.
If you know how to use Maven, add this pom snippet to your pom.xml.
<dependency> <groupId>com.google.caliper</groupId> <artifactId>caliper</artifactId> <version>0.5-rc1</version> </dependency>
- If you want to learn maven, first read this: http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
- Convert your project to a maven project (Right click on project -> Configure -> Convert to Maven Project)
- If you don't know how to use Maven (here is a guide to how to do this with pictures):
- Download the 0.5-rc1 jar
- Right click on the project you want to use and choose
Build Path -> Configure Build Path
- Add it to your libraries tab using
Add External Jar
Once you've done that, you can start writing benchmarks. Here is an example of a benchmark I wrote for a different Stack Overflow question.