[BAEL-2996] Moving all test under this module and adding benchmarking
This commit is contained in:
@@ -4,13 +4,19 @@ import cern.colt.matrix.DoubleFactory2D;
|
||||
import cern.colt.matrix.DoubleMatrix2D;
|
||||
import cern.colt.matrix.linalg.Algebra;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.openjdk.jmh.annotations.*;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class DoubleMatrix2DUnitTest {
|
||||
@BenchmarkMode(Mode.AverageTime)
|
||||
@Fork(value = 2)
|
||||
@Warmup(iterations = 5)
|
||||
@Measurement(iterations = 10)
|
||||
public class DoubleMatrix2DUnitTest {
|
||||
|
||||
@Test
|
||||
void givenTwoMatrices_whenMultiply_thenMultiplicatedMatrix() {
|
||||
@Benchmark
|
||||
public void givenTwoMatrices_whenMultiply_thenMultiplicatedMatrix() {
|
||||
DoubleFactory2D doubleFactory2D = DoubleFactory2D.dense;
|
||||
|
||||
DoubleMatrix2D firstMatrix = doubleFactory2D.make(
|
||||
@@ -41,4 +47,5 @@ class DoubleMatrix2DUnitTest {
|
||||
|
||||
assertThat(actual).isEqualTo(expected);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user