Package org.teavm.perf
Class BenchmarkResult
java.lang.Object
org.teavm.perf.BenchmarkResult
Result of running a single benchmark with particular mode and parameters, either obtained by running
benchmark or read from a JMH JSON file.
-
Constructor Summary
ConstructorsConstructorDescriptionBenchmarkResult(String source, String sourceDescription, String benchmark, String mode, Map<String, String> params, String unit, List<List<Double>> rawData) Creates result and computes score and error from raw data.BenchmarkResult(String source, String sourceDescription, String benchmark, String mode, Map<String, String> params, String unit, List<List<Double>> rawData, double score, double error) Creates result with explicitly given score and error. -
Method Summary
Modifier and TypeMethodDescriptionName of TeaVM backend that produced the result ornullif result is not produced by TeaVM (e.g. read from JSON produced by JMH).doublegetError()getKey()Key that identifies benchmark, mode and parameters, used to match results from different sources.Additional fields of JMH JSON format, like number of iterations, iteration time, etc.getMode()Benchmark parameters, sorted by name.doublegetScore()getUnit()voidsetBackend(String backend)
-
Constructor Details
-
BenchmarkResult
public BenchmarkResult(String source, String sourceDescription, String benchmark, String mode, Map<String, String> params, String unit, List<List<Double>> rawData) Creates result and computes score and error from raw data.- Parameters:
source- identifier of the source of results, e.g. name of a backend.mode- JMH short label of the mode, e.g.avgt.rawData- scores of measurement iterations, grouped by forks.
-
BenchmarkResult
public BenchmarkResult(String source, String sourceDescription, String benchmark, String mode, Map<String, String> params, String unit, List<List<Double>> rawData, double score, double error) Creates result with explicitly given score and error. When score is NaN, it's computed from raw data.
-
-
Method Details
-
getSource
-
getSourceDescription
-
getBenchmark
-
getMode
-
getParams
Benchmark parameters, sorted by name. -
getUnit
-
getRawData
-
getScore
public double getScore() -
getError
public double getError() -
getStatistics
-
getBackend
Name of TeaVM backend that produced the result ornullif result is not produced by TeaVM (e.g. read from JSON produced by JMH). -
setBackend
-
getMetadata
Additional fields of JMH JSON format, like number of iterations, iteration time, etc. -
getKey
Key that identifies benchmark, mode and parameters, used to match results from different sources.
-