Class SumPerformance
- java.lang.Object
-
- org.apache.commons.numbers.examples.jmh.core.SumPerformance
-
- Direct Known Subclasses:
SumPerformance_jmhType_B1
public class SumPerformance extends Object
Executes a benchmark to measure the speed of operations in theSumclass.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSumPerformance.ArrayInputClass providing double arrays for benchmarks.
-
Constructor Summary
Constructors Constructor Description SumPerformance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbaselineDouble(SumPerformance.ArrayInput input, org.openjdk.jmh.infra.Blackhole bh)Benchmark baseline for functions that use two input arrays.voidbaselineSingle(SumPerformance.ArrayInput input, org.openjdk.jmh.infra.Blackhole bh)Benchmark baseline for functions that use a single input array.voidsum(SumPerformance.ArrayInput input, org.openjdk.jmh.infra.Blackhole bh)Benchmark testingSumaddition performance.voidsumOfProducts(SumPerformance.ArrayInput input, org.openjdk.jmh.infra.Blackhole bh)Benchmark testingSumlinear combination performance.
-
-
-
Method Detail
-
baselineSingle
public void baselineSingle(SumPerformance.ArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Benchmark baseline for functions that use a single input array.- Parameters:
input- benchmark inputbh- data sink
-
baselineDouble
public void baselineDouble(SumPerformance.ArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Benchmark baseline for functions that use two input arrays.- Parameters:
input- benchmark inputbh- data sink
-
sum
public void sum(SumPerformance.ArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Benchmark testingSumaddition performance.- Parameters:
input- benchmark inputbh- data sink
-
sumOfProducts
public void sumOfProducts(SumPerformance.ArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Benchmark testingSumlinear combination performance.- Parameters:
input- benchmark inputbh- data sink
-
-