[BAEL-2996] Using OptionsBuilder instead of main method for benchmarking
This commit is contained in:
@@ -6,15 +6,10 @@ import org.openjdk.jmh.annotations.*;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@BenchmarkMode(Mode.AverageTime)
|
||||
@Fork(value = 2)
|
||||
@Warmup(iterations = 5)
|
||||
@Measurement(iterations = 10)
|
||||
public class SimpleMatrixUnitTest {
|
||||
class SimpleMatrixUnitTest {
|
||||
|
||||
@Test
|
||||
@Benchmark
|
||||
public void givenTwoMatrices_whenMultiply_thenMultiplicatedMatrix() {
|
||||
void givenTwoMatrices_whenMultiply_thenMultiplicatedMatrix() {
|
||||
SimpleMatrix firstMatrix = new SimpleMatrix(
|
||||
new double[][] {
|
||||
new double[] {1d, 5d},
|
||||
@@ -43,4 +38,4 @@ public class SimpleMatrixUnitTest {
|
||||
assertThat(actual).matches(m -> m.isIdentical(expected, 0d));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user