test_class.declarator: influxDb
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private InfluxDbSender influxDb;
test_class.type: InfluxDbSender
test_class.var_name: influxDb
test_class.declarator: writeObject
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private InfluxDbWriteObject writeObject;
test_class.type: InfluxDbWriteObject
test_class.var_name: writeObject
test_class.declarator: registry
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private MetricRegistry registry;
test_class.type: MetricRegistry
test_class.var_name: registry
test_class.declarator: reporter
test_class.modifier: private
test_class.original_string: private InfluxDbReporter reporter;
test_class.type: InfluxDbReporter
test_class.var_name: reporter
test_class.declarator: globalTags
test_class.modifier: private
test_class.original_string: private Map<String, String> globalTags;
test_class.type: Map<String, String>
test_class.var_name: globalTags
test_class.file: metrics-influxdb/src/test/java/com/izettle/metrics/influxdb/InfluxDbReporterTest.java
test_class.identifier: InfluxDbReporterTest
test_case.body: @Test
      public void shouldCatchExceptions() throws Exception {
          doThrow(ConnectException.class).when(influxDb).writeData();
          reporter.report(map("gauge", gauge((byte) 1)), this.map(), this.map(), this.map(), this.map());
          doThrow(IOException.class).when(influxDb).writeData();
          reporter.report(map("gauge", gauge((byte) 1)), this.map(), this.map(), this.map(), this.map());
          doThrow(RuntimeException.class).when(influxDb).flush();
          reporter.report(map("gauge", gauge((byte) 1)), this.map(), this.map(), this.map(), this.map());
      }
test_case.class_method_signature: InfluxDbReporterTest.shouldCatchExceptions()
test_case.full_signature: @Test public void shouldCatchExceptions()
test_case.identifier: shouldCatchExceptions
test_case.invocations: writeData when doThrow report map gauge map map map map writeData when doThrow report map gauge map map map map flush when doThrow report map gauge map map map map
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldCatchExceptions()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(InfluxDbReporter.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(InfluxDbReporter.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: influxDb
focal_class.modifier: private final
focal_class.original_string: private final InfluxDbSender influxDb;
focal_class.type: InfluxDbSender
focal_class.var_name: influxDb
focal_class.declarator: skipIdleMetrics
focal_class.modifier: private final
focal_class.original_string: private final boolean skipIdleMetrics;
focal_class.type: boolean
focal_class.var_name: skipIdleMetrics
focal_class.declarator: previousValues
focal_class.modifier: private final
focal_class.original_string: private final Map<String, Long> previousValues;
focal_class.type: Map<String, Long>
focal_class.var_name: previousValues
focal_class.declarator: groupGauges
focal_class.modifier: private final
focal_class.original_string: private final boolean groupGauges;
focal_class.type: boolean
focal_class.var_name: groupGauges
focal_class.declarator: includeTimerFields
focal_class.modifier: private final
focal_class.original_string: private final Set<String> includeTimerFields;
focal_class.type: Set<String>
focal_class.var_name: includeTimerFields
focal_class.declarator: includeMeterFields
focal_class.modifier: private final
focal_class.original_string: private final Set<String> includeMeterFields;
focal_class.type: Set<String>
focal_class.var_name: includeMeterFields
focal_class.declarator: measurementMappings
focal_class.modifier: private final
focal_class.original_string: private final Map<String, Pattern> measurementMappings;
focal_class.type: Map<String, Pattern>
focal_class.var_name: measurementMappings
focal_class.declarator: tagsTransformer
focal_class.modifier: private final
focal_class.original_string: private final Transformer tagsTransformer;
focal_class.type: Transformer
focal_class.var_name: tagsTransformer
focal_class.file: metrics-influxdb/src/main/java/com/izettle/metrics/influxdb/InfluxDbReporter.java
focal_class.identifier: InfluxDbReporter
focal_class.class_method_signature: InfluxDbReporter.InfluxDbReporter(
          final MetricRegistry registry,
          final InfluxDbSender influxDb,
          final Map<String, String> tags,
          final TimeUnit rateUnit,
          final TimeUnit durationUnit,
          final MetricFilter filter,
          final boolean skipIdleMetrics,
          final boolean groupGauges,
          final Set<String> includeTimerFields,
          final Set<String> includeMeterFields,
          final Map<String, Pattern> measurementMappings,
          final Transformer tagsTransformer
      )
focal_class.full_signature: private  InfluxDbReporter(
          final MetricRegistry registry,
          final InfluxDbSender influxDb,
          final Map<String, String> tags,
          final TimeUnit rateUnit,
          final TimeUnit durationUnit,
          final MetricFilter filter,
          final boolean skipIdleMetrics,
          final boolean groupGauges,
          final Set<String> includeTimerFields,
          final Set<String> includeMeterFields,
          final Map<String, Pattern> measurementMappings,
          final Transformer tagsTransformer
      )
focal_class.identifier: InfluxDbReporter
focal_class.modifiers: private
focal_class.parameters: (
          final MetricRegistry registry,
          final InfluxDbSender influxDb,
          final Map<String, String> tags,
          final TimeUnit rateUnit,
          final TimeUnit durationUnit,
          final MetricFilter filter,
          final boolean skipIdleMetrics,
          final boolean groupGauges,
          final Set<String> includeTimerFields,
          final Set<String> includeMeterFields,
          final Map<String, Pattern> measurementMappings,
          final Transformer tagsTransformer
      )
focal_class.signature:  InfluxDbReporter(
          final MetricRegistry registry,
          final InfluxDbSender influxDb,
          final Map<String, String> tags,
          final TimeUnit rateUnit,
          final TimeUnit durationUnit,
          final MetricFilter filter,
          final boolean skipIdleMetrics,
          final boolean groupGauges,
          final Set<String> includeTimerFields,
          final Set<String> includeMeterFields,
          final Map<String, Pattern> measurementMappings,
          final Transformer tagsTransformer
      )
focal_class.class_method_signature: InfluxDbReporter.forRegistry(MetricRegistry registry)
focal_class.full_signature: public static Builder forRegistry(MetricRegistry registry)
focal_class.identifier: forRegistry
focal_class.modifiers: public static
focal_class.parameters: (MetricRegistry registry)
focal_class.return: Builder
focal_class.signature: Builder forRegistry(MetricRegistry registry)
focal_class.class_method_signature: InfluxDbReporter.report(
          final SortedMap<String, Gauge> gauges,
          final SortedMap<String, Counter> counters,
          final SortedMap<String, Histogram> histograms,
          final SortedMap<String, Meter> meters,
          final SortedMap<String, Timer> timers)
focal_class.full_signature: @Override public void report(
          final SortedMap<String, Gauge> gauges,
          final SortedMap<String, Counter> counters,
          final SortedMap<String, Histogram> histograms,
          final SortedMap<String, Meter> meters,
          final SortedMap<String, Timer> timers)
focal_class.identifier: report
focal_class.modifiers: @Override public
focal_class.parameters: (
          final SortedMap<String, Gauge> gauges,
          final SortedMap<String, Counter> counters,
          final SortedMap<String, Histogram> histograms,
          final SortedMap<String, Meter> meters,
          final SortedMap<String, Timer> timers)
focal_class.return: void
focal_class.signature: void report(
          final SortedMap<String, Gauge> gauges,
          final SortedMap<String, Counter> counters,
          final SortedMap<String, Histogram> histograms,
          final SortedMap<String, Meter> meters,
          final SortedMap<String, Timer> timers)
focal_class.class_method_signature: InfluxDbReporter.reportGauges(SortedMap<String, Gauge> gauges, long now)
focal_class.full_signature: private void reportGauges(SortedMap<String, Gauge> gauges, long now)
focal_class.identifier: reportGauges
focal_class.modifiers: private
focal_class.parameters: (SortedMap<String, Gauge> gauges, long now)
focal_class.return: void
focal_class.signature: void reportGauges(SortedMap<String, Gauge> gauges, long now)
focal_class.class_method_signature: InfluxDbReporter.groupGauges(SortedMap<String, Gauge> gauges)
focal_class.full_signature: private Map<String, Map<String, Gauge>> groupGauges(SortedMap<String, Gauge> gauges)
focal_class.identifier: groupGauges
focal_class.modifiers: private
focal_class.parameters: (SortedMap<String, Gauge> gauges)
focal_class.return: Map<String, Map<String, Gauge>>
focal_class.signature: Map<String, Map<String, Gauge>> groupGauges(SortedMap<String, Gauge> gauges)
focal_class.class_method_signature: InfluxDbReporter.reportGaugeGroup(String name, Map<String, Gauge> gaugeGroup, long now)
focal_class.full_signature: private void reportGaugeGroup(String name, Map<String, Gauge> gaugeGroup, long now)
focal_class.identifier: reportGaugeGroup
focal_class.modifiers: private
focal_class.parameters: (String name, Map<String, Gauge> gaugeGroup, long now)
focal_class.return: void
focal_class.signature: void reportGaugeGroup(String name, Map<String, Gauge> gaugeGroup, long now)
focal_class.class_method_signature: InfluxDbReporter.sanitizeGauge(Object value)
focal_class.full_signature: private Object sanitizeGauge(Object value)
focal_class.identifier: sanitizeGauge
focal_class.modifiers: private
focal_class.parameters: (Object value)
focal_class.return: Object
focal_class.signature: Object sanitizeGauge(Object value)
focal_class.class_method_signature: InfluxDbReporter.reportTimer(String name, Timer timer, long now)
focal_class.full_signature: private void reportTimer(String name, Timer timer, long now)
focal_class.identifier: reportTimer
focal_class.modifiers: private
focal_class.parameters: (String name, Timer timer, long now)
focal_class.return: void
focal_class.signature: void reportTimer(String name, Timer timer, long now)
focal_class.class_method_signature: InfluxDbReporter.reportHistogram(String name, Histogram histogram, long now)
focal_class.full_signature: private void reportHistogram(String name, Histogram histogram, long now)
focal_class.identifier: reportHistogram
focal_class.modifiers: private
focal_class.parameters: (String name, Histogram histogram, long now)
focal_class.return: void
focal_class.signature: void reportHistogram(String name, Histogram histogram, long now)
focal_class.class_method_signature: InfluxDbReporter.reportCounter(String name, Counter counter, long now)
focal_class.full_signature: private void reportCounter(String name, Counter counter, long now)
focal_class.identifier: reportCounter
focal_class.modifiers: private
focal_class.parameters: (String name, Counter counter, long now)
focal_class.return: void
focal_class.signature: void reportCounter(String name, Counter counter, long now)
focal_class.class_method_signature: InfluxDbReporter.reportGauge(String name, Gauge<?> gauge, long now)
focal_class.full_signature: private void reportGauge(String name, Gauge<?> gauge, long now)
focal_class.identifier: reportGauge
focal_class.modifiers: private
focal_class.parameters: (String name, Gauge<?> gauge, long now)
focal_class.return: void
focal_class.signature: void reportGauge(String name, Gauge<?> gauge, long now)
focal_class.class_method_signature: InfluxDbReporter.reportMeter(String name, Metered meter, long now)
focal_class.full_signature: private void reportMeter(String name, Metered meter, long now)
focal_class.identifier: reportMeter
focal_class.modifiers: private
focal_class.parameters: (String name, Metered meter, long now)
focal_class.return: void
focal_class.signature: void reportMeter(String name, Metered meter, long now)
focal_class.class_method_signature: InfluxDbReporter.canSkipMetric(String name, Counting counting)
focal_class.full_signature: private boolean canSkipMetric(String name, Counting counting)
focal_class.identifier: canSkipMetric
focal_class.modifiers: private
focal_class.parameters: (String name, Counting counting)
focal_class.return: boolean
focal_class.signature: boolean canSkipMetric(String name, Counting counting)
focal_class.class_method_signature: InfluxDbReporter.calculateDelta(String name, long count)
focal_class.full_signature: private long calculateDelta(String name, long count)
focal_class.identifier: calculateDelta
focal_class.modifiers: private
focal_class.parameters: (String name, long count)
focal_class.return: long
focal_class.signature: long calculateDelta(String name, long count)
focal_class.class_method_signature: InfluxDbReporter.getTags(String name)
focal_class.full_signature: private Map<String, String> getTags(String name)
focal_class.identifier: getTags
focal_class.modifiers: private
focal_class.parameters: (String name)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> getTags(String name)
focal_class.class_method_signature: InfluxDbReporter.getMeasurementName(final String name)
focal_class.full_signature: private String getMeasurementName(final String name)
focal_class.identifier: getMeasurementName
focal_class.modifiers: private
focal_class.parameters: (final String name)
focal_class.return: String
focal_class.signature: String getMeasurementName(final String name)
focal_class.superclass: extends ScheduledReporter
focal_method.body: @Override
      public void report(
          final SortedMap<String, Gauge> gauges,
          final SortedMap<String, Counter> counters,
          final SortedMap<String, Histogram> histograms,
          final SortedMap<String, Meter> meters,
          final SortedMap<String, Timer> timers) {
          final long now = System.currentTimeMillis();
  
          try {
              influxDb.flush();
  
              reportGauges(gauges, now);
  
              for (Map.Entry<String, Counter> entry : counters.entrySet()) {
                  reportCounter(entry.getKey(), entry.getValue(), now);
              }
  
              for (Map.Entry<String, Histogram> entry : histograms.entrySet()) {
                  reportHistogram(entry.getKey(), entry.getValue(), now);
              }
  
              for (Map.Entry<String, Meter> entry : meters.entrySet()) {
                  reportMeter(entry.getKey(), entry.getValue(), now);
              }
  
              for (Map.Entry<String, Timer> entry : timers.entrySet()) {
                  reportTimer(entry.getKey(), entry.getValue(), now);
              }
  
              if (influxDb.hasSeriesData()) {
                  influxDb.writeData();
              }
          } catch (ConnectException e) {
              LOGGER.warn("Unable to connect to InfluxDB. Discarding data.");
          } catch (Exception e) {
              LOGGER.warn("Unable to report to InfluxDB with error '{}'. Discarding data.", e.getMessage());
          }
      }
focal_method.class_method_signature: InfluxDbReporter.report(
          final SortedMap<String, Gauge> gauges,
          final SortedMap<String, Counter> counters,
          final SortedMap<String, Histogram> histograms,
          final SortedMap<String, Meter> meters,
          final SortedMap<String, Timer> timers)
focal_method.full_signature: @Override public void report(
          final SortedMap<String, Gauge> gauges,
          final SortedMap<String, Counter> counters,
          final SortedMap<String, Histogram> histograms,
          final SortedMap<String, Meter> meters,
          final SortedMap<String, Timer> timers)
focal_method.identifier: report
focal_method.invocations: currentTimeMillis flush reportGauges entrySet reportCounter getKey getValue entrySet reportHistogram getKey getValue entrySet reportMeter getKey getValue entrySet reportTimer getKey getValue hasSeriesData writeData warn warn getMessage
focal_method.modifiers: @Override public
focal_method.parameters: (
          final SortedMap<String, Gauge> gauges,
          final SortedMap<String, Counter> counters,
          final SortedMap<String, Histogram> histograms,
          final SortedMap<String, Meter> meters,
          final SortedMap<String, Timer> timers)
focal_method.return: void
focal_method.signature: void report(
          final SortedMap<String, Gauge> gauges,
          final SortedMap<String, Counter> counters,
          final SortedMap<String, Histogram> histograms,
          final SortedMap<String, Meter> meters,
          final SortedMap<String, Timer> timers)