private void metrics(List<Bench> benches, Strategy choice) {
        List<Bench> chosen = new ArrayList<>();

        for (Bench b : benches) {
            if (b.category() == choice) {
                chosen.add(b);
            }
        }

        long[] rawTime = new long[chosen.size()];
        long[] rawOutputLength = new long[chosen.size()];
        long[] rawIterations = new long[chosen.size()];
        double[] rawIterationsPerSecond = new double[chosen.size()];

        for (int i = 0; i < chosen.size(); ++i) {
            Bench b = chosen.get(i);
            rawTime[i] = b.end - b.start;
            rawOutputLength[i] = b.metric;
            rawIterations[i] = b.runs;
            rawIterationsPerSecond[i] = ((double) b.runs) / (((double) (b.end - b.start)) / 1000.0d);
        }

        double avgTime = mean(rawTime);
        double avgOutputLength = mean(rawOutputLength);
        double avgIterations = mean(rawIterations);
        double avgIterationsPerSecond = mean(rawIterationsPerSecond);

        System.out.println("For " + choice + ":");
        dumpMetric("run time", rawTime, avgTime, "s", 0.001d);
        dumpMetric("output length", rawOutputLength, avgOutputLength, "bytes", 1.0d);
        dumpMetric("iterations", rawIterations, avgIterations, "", 1.0d);
        dumpMetric("iterations per second", rawIterationsPerSecond, avgIterationsPerSecond, "s**-1", 1.0d);
    }
Object identity is used to differentiate between different implementation strategies, toString() is used to print a report.

@return an object with a descriptive toString() for the implementation under test
vespajlib/src/test/java/com/yahoo/text/JsonMicroBenchmarkTestCase.java