org.openjdk.jmh.util.Statistics Java Examples
The following examples show how to use
org.openjdk.jmh.util.Statistics.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BenchmarkHiveFileFormat.java From presto with Apache License 2.0 | 5 votes |
public static void main(String[] args) throws Exception { Options opt = new OptionsBuilder() .include(".*\\." + BenchmarkHiveFileFormat.class.getSimpleName() + ".*") .jvmArgsAppend("-Xmx4g", "-Xms4g", "-XX:+UseG1GC") .build(); Collection<RunResult> results = new Runner(opt).run(); for (RunResult result : results) { Statistics inputSizeStats = result.getSecondaryResults().get("inputSize").getStatistics(); Statistics outputSizeStats = result.getSecondaryResults().get("outputSize").getStatistics(); double compressionRatio = 1.0 * inputSizeStats.getSum() / outputSizeStats.getSum(); String compression = result.getParams().getParam("compression"); String fileFormat = result.getParams().getParam("fileFormat"); String dataSet = result.getParams().getParam("dataSet"); System.out.printf(" %-10s %-30s %-10s %-25s %2.2f %10s ± %11s (%5.2f%%) (N = %d, \u03B1 = 99.9%%)\n", result.getPrimaryResult().getLabel(), dataSet, compression, fileFormat, compressionRatio, toHumanReadableSpeed((long) inputSizeStats.getMean()), toHumanReadableSpeed((long) inputSizeStats.getMeanErrorAt(0.999)), inputSizeStats.getMeanErrorAt(0.999) * 100 / inputSizeStats.getMean(), inputSizeStats.getN()); } System.out.println(); }
Example #2
Source File: BenchmarkResultProcessor.java From aws-sdk-java-v2 with Apache License 2.0 | 5 votes |
private SdkBenchmarkResult constructSdkBenchmarkResult(RunResult runResult) { Statistics statistics = runResult.getPrimaryResult().getStatistics(); SdkBenchmarkStatistics sdkBenchmarkStatistics = new SdkBenchmarkStatistics(statistics); SdkBenchmarkParams sdkBenchmarkParams = new SdkBenchmarkParams(runResult.getParams()); return new SdkBenchmarkResult(getBenchmarkId(runResult.getParams()), sdkBenchmarkParams, sdkBenchmarkStatistics); }
Example #3
Source File: SdkBenchmarkStatistics.java From aws-sdk-java-v2 with Apache License 2.0 | 5 votes |
public SdkBenchmarkStatistics(Statistics statistics) { this.mean = statistics.getMean(); this.variance = statistics.getVariance(); this.standardDeviation = statistics.getStandardDeviation(); this.max = statistics.getMax(); this.min = statistics.getMin(); this.n = statistics.getN(); this.sum = statistics.getSum(); }
Example #4
Source File: OptionalScalarResult.java From cache2k-benchmark with Apache License 2.0 | 4 votes |
OptionalScalarResult(String label, Statistics s, String unit, AggregationPolicy policy) { super(ResultRole.SECONDARY, label, s, unit, policy); }