Skip to content

ProjectHome

Colin Decker edited this page May 19, 2015 · 1 revision

http://caliper.googlecode.com/svn/static/caliper.png

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>

Getting Started

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();
      }
    }
  }

Tutorial Video

Best viewed in YouTube @ 1080p

Code Samples

Very short tutorial examples.

More introductory examples.

Caliper Design

A discussion of the design and methodology employed by caliper can be found in the Caliper Design Document.

Clone this wiki locally