Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.junit.Test;
- import com.carrotsearch.junitbenchmarks.AbstractBenchmark;
- import com.carrotsearch.junitbenchmarks.BenchmarkOptions;
- import com.carrotsearch.junitbenchmarks.annotation.BenchmarkMethodChart;
- /**
- * @author benelog
- */
- @BenchmarkMethodChart(filePrefix = "benchmark-sample")
- public class SampleBenchmarkTest extends AbstractBenchmark {
- @Test
- @BenchmarkOptions(benchmarkRounds = 3, warmupRounds = 0)
- public void test1() {
- System.out.println("hello world1");
- }
- @Test
- @BenchmarkOptions(benchmarkRounds = 3, warmupRounds = 0)
- public void test2() {
- System.out.println("hello world2");
- }
- }
Add Comment
Please, Sign In to add comment