@Test public void testGetInfluxDbStringWhiteSpace() throws Exception { assertEquals("cpu\\ usage,level=soft\\ irq", InfluxDbReporter.getInfluxDbLineProtocolString(name("cpu usage").tag("level", "soft irq").build())); }
public static String getInfluxDbLineProtocolString(MetricName metricName) { String influxDbString = metricNameToInfluxDBFormatCache.get(metricName); if (influxDbString == null) { final StringBuilder sb = new StringBuilder(metricName.getName().length() + metricName.getTagKeys().size() * 16 + metricName.getTagKeys().size()); sb.append(escapeForInfluxDB(metricName.getName())); appendTags(sb, metricName.getTags()); influxDbString = sb.toString(); metricNameToInfluxDBFormatCache.put(metricName, influxDbString); } return influxDbString; }
InfluxDbReporter extends ScheduledMetrics2Reporter { public static String getInfluxDbLineProtocolString(MetricName metricName) { String influxDbString = metricNameToInfluxDBFormatCache.get(metricName); if (influxDbString == null) { final StringBuilder sb = new StringBuilder(metricName.getName().length() + metricName.getTagKeys().size() * 16 + metricName.getTagKeys().size()); sb.append(escapeForInfluxDB(metricName.getName())); appendTags(sb, metricName.getTags()); influxDbString = sb.toString(); metricNameToInfluxDBFormatCache.put(metricName, influxDbString); } return influxDbString; } }
InfluxDbReporter extends ScheduledMetrics2Reporter { public static String getInfluxDbLineProtocolString(MetricName metricName) { String influxDbString = metricNameToInfluxDBFormatCache.get(metricName); if (influxDbString == null) { final StringBuilder sb = new StringBuilder(metricName.getName().length() + metricName.getTagKeys().size() * 16 + metricName.getTagKeys().size()); sb.append(escapeForInfluxDB(metricName.getName())); appendTags(sb, metricName.getTags()); influxDbString = sb.toString(); metricNameToInfluxDBFormatCache.put(metricName, influxDbString); } return influxDbString; } private  InfluxDbReporter(Builder builder); }
InfluxDbReporter extends ScheduledMetrics2Reporter { public static String getInfluxDbLineProtocolString(MetricName metricName) { String influxDbString = metricNameToInfluxDBFormatCache.get(metricName); if (influxDbString == null) { final StringBuilder sb = new StringBuilder(metricName.getName().length() + metricName.getTagKeys().size() * 16 + metricName.getTagKeys().size()); sb.append(escapeForInfluxDB(metricName.getName())); appendTags(sb, metricName.getTags()); influxDbString = sb.toString(); metricNameToInfluxDBFormatCache.put(metricName, influxDbString); } return influxDbString; } private  InfluxDbReporter(Builder builder); static Builder forRegistry(Metric2Registry registry, CorePlugin corePlugin); @Override void reportMetrics(Map<MetricName, Gauge> gauges,
							  Map<MetricName, Counter> counters,
							  Map<MetricName, Histogram> histograms,
							  Map<MetricName, Meter> meters,
							  Map<MetricName, Timer> timers); static String getInfluxDbLineProtocolString(MetricName metricName); }
InfluxDbReporter extends ScheduledMetrics2Reporter { public static String getInfluxDbLineProtocolString(MetricName metricName) { String influxDbString = metricNameToInfluxDBFormatCache.get(metricName); if (influxDbString == null) { final StringBuilder sb = new StringBuilder(metricName.getName().length() + metricName.getTagKeys().size() * 16 + metricName.getTagKeys().size()); sb.append(escapeForInfluxDB(metricName.getName())); appendTags(sb, metricName.getTags()); influxDbString = sb.toString(); metricNameToInfluxDBFormatCache.put(metricName, influxDbString); } return influxDbString; } private  InfluxDbReporter(Builder builder); static Builder forRegistry(Metric2Registry registry, CorePlugin corePlugin); @Override void reportMetrics(Map<MetricName, Gauge> gauges,
							  Map<MetricName, Counter> counters,
							  Map<MetricName, Histogram> histograms,
							  Map<MetricName, Meter> meters,
							  Map<MetricName, Timer> timers); static String getInfluxDbLineProtocolString(MetricName metricName);  }