presto-benchmark/src/main/java/io/prestosql/benchmark/AbstractBenchmark.java/AbstractBenchmark/runBenchmark
class AbstractBenchmark:    public void runBenchmark(@Nullable BenchmarkResultHook benchmarkResultHook)
    {
        AverageBenchmarkResults averageBenchmarkResults = new AverageBenchmarkResults();
        setUp();
        try {
            for (int i = 0; i < warmupIterations; i++) {
                runOnce();
            }
            for (int i = 0; i < measuredIterations; i++) {
                Map<String, Long> results = runOnce();
                if (benchmarkResultHook != null) {
                    benchmarkResultHook.addResults(results);
                }
                averageBenchmarkResults.addResults(results);
            }
        }
        catch (Throwable t) {
            throw new RuntimeException("Exception in " + getBenchmarkName(), t);
        }
        finally {
            tearDown();
        }
        if (benchmarkResultHook != null) {
            benchmarkResultHook.finished();
        }

        Map<String, Double> resultsAvg = averageBenchmarkResults.getAverageResultsValues();
        Duration cpuNanos = new Duration(resultsAvg.get("cpu_nanos"), NANOSECONDS);

        long inputRows = resultsAvg.get("input_rows").longValue();
        DataSize inputBytes = new DataSize(resultsAvg.get("input_bytes"), BYTE);

        long outputRows = resultsAvg.get("output_rows").longValue();
        DataSize outputBytes = new DataSize(resultsAvg.get("output_bytes"), BYTE);

        DataSize memory = new DataSize(resultsAvg.get("peak_memory"), BYTE);
        System.out.printf("%35s :: %8.3f cpu ms :: %5s peak memory :: in %5s,  %6s,  %8s,  %8s :: out %5s,  %6s,  %8s,  %8s%n",
                getBenchmarkName(),
                cpuNanos.getValue(MILLISECONDS),

                formatDataSize(memory, true),

                formatCount(inputRows),
                formatDataSize(inputBytes, true),
                formatCountRate(inputRows, cpuNanos, true),
                formatDataRate(inputBytes, cpuNanos, true),

                formatCount(outputRows),
                formatDataSize(outputBytes, true),
                formatCountRate(outputRows, cpuNanos, true),
                formatDataRate(outputBytes, cpuNanos, true));
    }