private void write(DiagnosticsLogWriter writer, String text, ItemCounter<String> samples) { writer.startSection(text); long total = samples.total(); for (String name : samples.descendingKeys()) { long s = samples.get(name); writer.writeKeyValueEntry(name, s + " " + (HUNDRED * s / total) + "%"); } writer.endSection(); }
private void write(DiagnosticsLogWriter writer, String text, ItemCounter<String> samples) { writer.startSection(text); long total = samples.total(); for (String name : samples.descendingKeys()) { long s = samples.get(name); writer.writeKeyValueEntry(name, s + " " + (HUNDRED * s / total) + "%"); } writer.endSection(); }