https://github.com/google/caliper
Micro-benchmarking library for Java
https://github.com/google/caliper
Last synced: 6 days ago
JSON representation
Micro-benchmarking library for Java
- Host: GitHub
- URL: https://github.com/google/caliper
- Owner: google
- License: apache-2.0
- Created: 2015-05-19T15:28:40.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2025-04-08T14:45:23.000Z (15 days ago)
- Last Synced: 2025-04-08T15:45:16.560Z (15 days ago)
- Language: Java
- Homepage:
- Size: 8.36 MB
- Stars: 816
- Watchers: 51
- Forks: 108
- Open Issues: 114
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
- awesome-java - Caliper
README
# Caliper
> **NOTICE:** The Caliper web application that was at
> microbenchmarks.appspot.com was shut down on August 15, 2022.Caliper is a tool for measuring Java code performance, primarily focused on
microbenchmarks.## Prefer [JMH] or [Jetpack Microbenchmark]
For new benchmarks, we recommend using a tool other than Caliper:
- For JVM benchmarks, use [JMH], which generally provides
[more accurate results](https://groups.google.com/g/mechanical-sympathy/c/m4opvy4xq3U/m/7lY8x8SvHgwJ)
than Caliper.
- For Android benchmarks, use the [Jetpack Microbenchmark] library.## Building
To build the JVM version of Caliper (the only supported version at the moment),
run:```shell
mvn clean install -am -pl caliper
```### Android
Caliper currently has a number of artifacts related to Android. These are in
a transitional state and no easy way to run Caliper benchmarks on Android is
currently available.If you are interested in building the Android artifacts for any reason, you can
run:```shell
mvn clean install -am -pl caliper-android
```Note that for these artifacts to build, you must have an `ANDROID_HOME`
environment variable set to the location of an Android SDK containing the file
`platforms/android-25/android.jar`. Alternatively, you can pass
`-Dandroid.home=` to your `mvn` command to set the Android SDK directory
that way, and/or `-Dandroid.sdk.version=` to specify a version other
than `25` (but note that the build may not work with a version lower than `25`).[JMH]: https://openjdk.java.net/projects/code-tools/jmh/
[Jetpack Microbenchmark]: https://developer.android.com/topic/performance/benchmarking/microbenchmark-overview