Class BenchmarkMetric
java.lang.Object
com.github.rlacher.sortbench.results.BenchmarkMetric
Represents a raw profiling measurement from a single benchmark iteration.
The meaning of this metric value is determined by the Benchmarker.ProfilingMode used.
This object is the direct result of a sorting operation,
instantiated by the Benchmarker.
-
Constructor Summary
ConstructorsConstructorDescriptionBenchmarkMetric(Benchmarker.ProfilingMode mode, double value) Constructs a newBenchmarkMetricobject. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if two BenchmarkMetric objects are equal based on their profiling mode and metric value.Returns the profiling mode used during the benchmark iteration.doublegetValue()Returns a measurement value representing the profiling metric of a benchmark iteration.inthashCode()Generates a hash code for the BenchmarkMetric object based on its profiling mode and value.toString()Turns the BenchmarkMetric into a string representation.
-
Constructor Details
-
BenchmarkMetric
Constructs a newBenchmarkMetricobject.- Parameters:
mode- The profiling mode used during the benchmark iteration.value- The metric of the benchmark iteration.- Throws:
IllegalArgumentException- If either mode or value are negative.
-
-
Method Details
-
getProfilingMode
Returns the profiling mode used during the benchmark iteration.- Returns:
- The profiling mode used in the benchmark.
-
getValue
public double getValue()Returns a measurement value representing the profiling metric of a benchmark iteration.- Returns:
- The benchmark metric value.
-
equals
Checks if two BenchmarkMetric objects are equal based on their profiling mode and metric value. -
hashCode
public int hashCode()Generates a hash code for the BenchmarkMetric object based on its profiling mode and value. -
toString
Turns the BenchmarkMetric into a string representation.
-