Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package eu.toolchain.perftests;
 
 import java.util.List;
 
These tests are only in place to verify to a loose degree that we get at least as good performance as Guava.

Author(s):
udoprog
public class AsyncPerformanceTests {
    public static void main(String argv[]) throws RunnerException {
        final ChainedOptionsBuilder builder = new OptionsBuilder().include("eu\\.toolchain\\.perftests.jmh").forks(1);
        final Collection<RunResultresults = new Runner(builder.build()).run();
        // graph(results);
    }
    private static void graph(final Collection<RunResultresults) {
        final XYSeriesCollection data = new XYSeriesCollection();
        for (final RunResult result : results) {
            final BenchmarkResult a = result.getAggregatedResult();
            int index = 0;
            final XYSeries series = new XYSeries(result.getParams().getBenchmark());
            for (IterationResult iteration : a.getIterationResults()) {
                series.add(index++, iteration.getPrimaryResult().getScore());
            }
            result.getPrimaryResult().getScoreUnit();
            data.addSeries(series);
        }
        final List<Charts.Datasetdatasets = new ArrayList<>();
        datasets.add(new Charts.Dataset("iteration""ops/s"data));
        Charts.showChart("benchmarks", Charts.createChart("benchmarks"datasets));
    }
New to GrepCode? Check out our FAQ X