/** * Dump all the metrics to a string. * @param prefix prefix before every entry * @param separator separator between name and value * @param suffix suffix * @param all get all the metrics even if the values are not changed. * @return a string dump of the metrics */ public String dump(String prefix, String separator, String suffix, boolean all) { MetricStringBuilder metricBuilder = new MetricStringBuilder(null, prefix, separator, suffix); registry.snapshot(metricBuilder, all); return metricBuilder.toString(); }