@Test public void derivingMeterBump5Test() { registry.derivingMeter(MetricId.build("X").tagged("what", "balls", "status", "tripping")).mark(5); verify(remote).post("/", "what:balls", ImmutableMap.of( "type", "metric", "value", "5", "key", "X", "attributes", ImmutableMap.of( "metric_type", "deriving_meter", "status", "tripping", "what", "balls"))); }
@Override public RemoteDerivingMeter derivingMeter(MetricId name, List<String> shardKey) { return getOrAdd(name, shardKey, SemanticAggregatorMetricBuilder.REMOTE_DERIVING_METERS); }
SemanticAggregatorMetricRegistry implements RemoteSemanticMetricRegistry { @Override public RemoteDerivingMeter derivingMeter(MetricId name, List<String> shardKey) { return getOrAdd(name, shardKey, SemanticAggregatorMetricBuilder.REMOTE_DERIVING_METERS); } }
SemanticAggregatorMetricRegistry implements RemoteSemanticMetricRegistry { @Override public RemoteDerivingMeter derivingMeter(MetricId name, List<String> shardKey) { return getOrAdd(name, shardKey, SemanticAggregatorMetricBuilder.REMOTE_DERIVING_METERS); } SemanticAggregatorMetricRegistry(
        String remoteHost,
        int port,
        int maxConcurrency,
        int hwm); @VisibleForTesting  SemanticAggregatorMetricRegistry(Remote remote); }
SemanticAggregatorMetricRegistry implements RemoteSemanticMetricRegistry { @Override public RemoteDerivingMeter derivingMeter(MetricId name, List<String> shardKey) { return getOrAdd(name, shardKey, SemanticAggregatorMetricBuilder.REMOTE_DERIVING_METERS); } SemanticAggregatorMetricRegistry(
        String remoteHost,
        int port,
        int maxConcurrency,
        int hwm); @VisibleForTesting  SemanticAggregatorMetricRegistry(Remote remote); T getOrAdd(
        final MetricId name,
        final List<String> shardKey,
        final SemanticAggregatorMetricBuilder<T> builder
    ); @Override RemoteCounter counter(MetricId name); @Override RemoteCounter counter(MetricId name, List<String> shardKey); @Override RemoteTimer timer(MetricId name); @Override RemoteTimer timer(MetricId name, List<String> shardKey); @Override RemoteDerivingMeter derivingMeter(MetricId name, List<String> shardKey); @Override RemoteDerivingMeter derivingMeter(MetricId name); @Override RemoteHistogram histogram(final MetricId name); @Override RemoteHistogram histogram(final MetricId name, final List<String> shardKey); @Override RemoteMeter meter(final MetricId name); @Override RemoteMeter meter(final MetricId name, final List<String> shardKey); @Override boolean shutdown(long timeout, TimeUnit timeUnit); }
SemanticAggregatorMetricRegistry implements RemoteSemanticMetricRegistry { @Override public RemoteDerivingMeter derivingMeter(MetricId name, List<String> shardKey) { return getOrAdd(name, shardKey, SemanticAggregatorMetricBuilder.REMOTE_DERIVING_METERS); } SemanticAggregatorMetricRegistry(
        String remoteHost,
        int port,
        int maxConcurrency,
        int hwm); @VisibleForTesting  SemanticAggregatorMetricRegistry(Remote remote); T getOrAdd(
        final MetricId name,
        final List<String> shardKey,
        final SemanticAggregatorMetricBuilder<T> builder
    ); @Override RemoteCounter counter(MetricId name); @Override RemoteCounter counter(MetricId name, List<String> shardKey); @Override RemoteTimer timer(MetricId name); @Override RemoteTimer timer(MetricId name, List<String> shardKey); @Override RemoteDerivingMeter derivingMeter(MetricId name, List<String> shardKey); @Override RemoteDerivingMeter derivingMeter(MetricId name); @Override RemoteHistogram histogram(final MetricId name); @Override RemoteHistogram histogram(final MetricId name, final List<String> shardKey); @Override RemoteMeter meter(final MetricId name); @Override RemoteMeter meter(final MetricId name, final List<String> shardKey); @Override boolean shutdown(long timeout, TimeUnit timeUnit);  }