com.carrotsearch.junitbenchmarks.AbstractBenchmark Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of junit-benchmarks Show documentation
Show all versions of junit-benchmarks Show documentation
A framework for writing performance micro-benchmarks using JUnit4 annotations, forked from https://github.com/carrotsearch/junit-benchmarks.
package com.carrotsearch.junitbenchmarks;
import org.junit.Rule;
import org.junit.rules.TestRule;
/**
* A superclass for tests that should be executed as benchmarks (several rounds, GC and
* time accounting). Provides a JUnit rule in {@link #benchmarkRun} that runs the tests
* repeatedly, logging the intermediate results (memory usage, times).
*
* Subclasses may add {@link BenchmarkOptions} at the class-level or to individual methods
* to override the defaults.
*
*/
public abstract class AbstractBenchmark
{
/**
* Enables the benchmark rule.
*/
@Rule
public TestRule benchmarkRun = new BenchmarkRule();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy