Search in sources :

Example 1 with Counter

use of com.google.cloud.bigtable.metrics.Counter in project simple-bigtable by spotify.

the class BigtableSemanticMetricsRegistry method counter.

@Override
public Counter counter(final String name) {
    final MetricId tagged = baseMetricId.tagged("what", name);
    final com.codahale.metrics.Counter counter = registry.counter(tagged);
    return new Counter() {

        @Override
        public void inc() {
            counter.inc();
        }

        @Override
        public void dec() {
            counter.dec();
        }
    };
}
Also used : MetricId(com.spotify.metrics.core.MetricId) Counter(com.google.cloud.bigtable.metrics.Counter)

Aggregations

Counter (com.google.cloud.bigtable.metrics.Counter)1 MetricId (com.spotify.metrics.core.MetricId)1