All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.carrotsearch.junitbenchmarks.AbstractBenchmark Maven / Gradle / Ivy

Go to download

A framework for writing performance micro-benchmarks using JUnit4 annotations, forked from https://github.com/carrotsearch/junit-benchmarks.

There is a newer version: 0.7.4-scijava
Show newest version
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