public double benchmark(int iterations, List<Tensor> modelMatrixes, TensorType.Dimension.Type dimensionType) {
        Tensor queryMatrix = matrix(1, 20, dimensionType).get(0);
        dotProduct(queryMatrix, modelMatrixes, Math.max(iterations/10, 10)); // warmup
        System.gc();
        long startTime = System.currentTimeMillis();
        dotProduct(queryMatrix, modelMatrixes, iterations);
        long totalTime = System.currentTimeMillis() - startTime;
        return (double)totalTime / (double)iterations;
    }
Microbenchmark of a "dot product" of two mapped rank 2 tensors

@author bratseth
vespajlib/src/test/java/com/yahoo/tensor/MatrixDotProductBenchmark.java