Here you can find the source of getBench(Map
private static String getBench(Map<String, AtomicLong> times, int amount)
//package com.java2s; //License from project: Apache License import java.util.*; import java.util.concurrent.atomic.AtomicLong; public class Main { private static String getBench(Map<String, AtomicLong> times, int amount) { long fullScanElapsed = times.get("FullScan").get(); StringBuilder result = new StringBuilder("<b>MicroBench</b> FullScan(ms):" + (fullScanElapsed / amount) / 1000 + " <br><b> Breakdown(%):</b><br>"); for (String key : times.keySet()) { long totalNanos = times.get(key).get(); result.append(key).append(":") .append(Math.round((((double) totalNanos / (double) fullScanElapsed) * 100.0))).append("<br>"); }/* ww w. ja va2 s . c o m*/ return result.toString(); } }