@Test public void testReportGaugesExponent() throws Exception { influxDbReporter.reportMetrics( metricNameMap(name("cpu_usage").type("user").tag("core", "1").build(), gauge(1e-8)), metricNameMap(Counter.class), metricNameMap(Histogram.class), metricNameMap(Meter.class), metricNameMap(Timer.class)); verify(httpClient).send(eq("POST"), eq("http: eq(singletonList(format("cpu_usage,core=1,type=user,app=test value=1.0e-8 %d", timestamp)))); }
@Override public void reportMetrics(Map<MetricName, Gauge> gauges, Map<MetricName, Counter> counters, Map<MetricName, Histogram> histograms, Map<MetricName, Meter> meters, Map<MetricName, Timer> timers) { final Timer.Context time = registry.timer(reportingTimeMetricName).time(); long timestamp = clock.getTime(); reportGauges(gauges, timestamp); reportCounter(counters, timestamp); reportHistograms(histograms, timestamp); reportMeters(meters, timestamp); reportTimers(timers, timestamp); flush(); time.stop(); }
InfluxDbReporter extends ScheduledMetrics2Reporter { @Override public void reportMetrics(Map<MetricName, Gauge> gauges, Map<MetricName, Counter> counters, Map<MetricName, Histogram> histograms, Map<MetricName, Meter> meters, Map<MetricName, Timer> timers) { final Timer.Context time = registry.timer(reportingTimeMetricName).time(); long timestamp = clock.getTime(); reportGauges(gauges, timestamp); reportCounter(counters, timestamp); reportHistograms(histograms, timestamp); reportMeters(meters, timestamp); reportTimers(timers, timestamp); flush(); time.stop(); } }
InfluxDbReporter extends ScheduledMetrics2Reporter { @Override public void reportMetrics(Map<MetricName, Gauge> gauges, Map<MetricName, Counter> counters, Map<MetricName, Histogram> histograms, Map<MetricName, Meter> meters, Map<MetricName, Timer> timers) { final Timer.Context time = registry.timer(reportingTimeMetricName).time(); long timestamp = clock.getTime(); reportGauges(gauges, timestamp); reportCounter(counters, timestamp); reportHistograms(histograms, timestamp); reportMeters(meters, timestamp); reportTimers(timers, timestamp); flush(); time.stop(); } private  InfluxDbReporter(Builder builder); }
InfluxDbReporter extends ScheduledMetrics2Reporter { @Override public void reportMetrics(Map<MetricName, Gauge> gauges, Map<MetricName, Counter> counters, Map<MetricName, Histogram> histograms, Map<MetricName, Meter> meters, Map<MetricName, Timer> timers) { final Timer.Context time = registry.timer(reportingTimeMetricName).time(); long timestamp = clock.getTime(); reportGauges(gauges, timestamp); reportCounter(counters, timestamp); reportHistograms(histograms, timestamp); reportMeters(meters, timestamp); reportTimers(timers, timestamp); flush(); time.stop(); } 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 { @Override public void reportMetrics(Map<MetricName, Gauge> gauges, Map<MetricName, Counter> counters, Map<MetricName, Histogram> histograms, Map<MetricName, Meter> meters, Map<MetricName, Timer> timers) { final Timer.Context time = registry.timer(reportingTimeMetricName).time(); long timestamp = clock.getTime(); reportGauges(gauges, timestamp); reportCounter(counters, timestamp); reportHistograms(histograms, timestamp); reportMeters(meters, timestamp); reportTimers(timers, timestamp); flush(); time.stop(); } 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);  }