@Override public void report() { // we do not need to lock here, because the dropwizard registry is // internally a concurrent map @SuppressWarnings("rawtypes") final SortedMap<String, com.codahale.metrics.Gauge> gauges = registry.getGauges(); final SortedMap<String, com.codahale.metrics.Counter> counters = registry.getCounters(); final SortedMap<String, com.codahale.metrics.Histogram> histograms = registry.getHistograms(); final SortedMap<String, com.codahale.metrics.Meter> meters = registry.getMeters(); final SortedMap<String, com.codahale.metrics.Timer> timers = registry.getTimers(); this.reporter.report(gauges, counters, histograms, meters, timers); }
@Override public long getProcessed() { return processed.getCount(); }
@Override public void incrementProcessedWithError() { processedWithError.mark(); }
public DropwizardRowIngestionMeters() { this.metricRegistry = new MetricRegistry(); this.processed = metricRegistry.meter(PROCESSED); this.processedWithError = metricRegistry.meter(PROCESSED_WITH_ERROR); this.unparseable = metricRegistry.meter(UNPARSEABLE); this.thrownAway = metricRegistry.meter(THROWN_AWAY); }
/** * Creates a new {@link JmxSink} with a {@link Properties} and {@link MetricRegistry}. * * @param properties the properties * @param registry the metric registry to register */ public JmxSink(Properties properties, MetricRegistry registry) { mReporter = JmxReporter.forRegistry(registry).build(); }
@Override public void update(long value) { dropwizardHistogram.update(value); }
@Override public long getMin() { return snapshot.getMin(); } }
@Override public double getStdDev() { return snapshot.getStdDev(); }
@Override public long getCount() { return dropwizardHistogram.getCount(); }
@Override public void incrementThrownAway() { thrownAway.mark(); }
@Override public long getUnparseable() { return unparseable.getCount(); }
@Override public void incrementProcessed() { processed.mark(); }
@Override public long getThrownAway() { return thrownAway.getCount(); }
@Override public void incrementUnparseable() { unparseable.mark(); }
@Override public long getProcessedWithError() { return processedWithError.getCount(); }
@Override public void markEvent(long n) { meter.mark(n); }
@Override public long getCount() { return meter.getCount(); } }