public String toLongString() { StringBuilder sb = new StringBuilder(); for (String name : getAllMetricNames()) { PerfMetric metric = getMetric(name); if (sb.length() > 0) { sb.append('\n'); } sb.append(" " + metric.toShortText()); String details = metric.toDetailsText(name); if (details != null) { sb.append('\n' + details); } } return sb.toString(); }
public void setMetric(PerfMetric metric) { metrics.put(metric.getName(), metric); }