@Test public void testMetricsDimensions() { TestScope scope = new TestScope(MetricsLevel.DETAILED, ImmutableSet.of("ShardId")); scope.addDimension("ShardId", "shard-0001"); scope.addDimension("Operation", "ProcessRecords"); scope.addDimension("ShardId", "shard-0001"); scope.addDimension("ShardId", "shard-0002"); scope.addDimension("WorkerIdentifier", "testworker"); scope.assertDimensions( TestHelper.constructDimension("ShardId", "shard-0001"), TestHelper.constructDimension("ShardId", "shard-0002")); }
@Override public void addDimension(String name, String value) { if (!metricsEnabledDimensionsAll && (metricsEnabledDimensions == null || !metricsEnabledDimensions.contains(name))) { return; } super.addDimension(name, value); }
FilteringMetricsScope extends AccumulateByNameMetricsScope { @Override public void addDimension(String name, String value) { if (!metricsEnabledDimensionsAll && (metricsEnabledDimensions == null || !metricsEnabledDimensions.contains(name))) { return; } super.addDimension(name, value); } }
FilteringMetricsScope extends AccumulateByNameMetricsScope { @Override public void addDimension(String name, String value) { if (!metricsEnabledDimensionsAll && (metricsEnabledDimensions == null || !metricsEnabledDimensions.contains(name))) { return; } super.addDimension(name, value); } FilteringMetricsScope();  FilteringMetricsScope(MetricsLevel metricsLevel, Set<String> metricsEnabledDimensions); }
FilteringMetricsScope extends AccumulateByNameMetricsScope { @Override public void addDimension(String name, String value) { if (!metricsEnabledDimensionsAll && (metricsEnabledDimensions == null || !metricsEnabledDimensions.contains(name))) { return; } super.addDimension(name, value); } FilteringMetricsScope();  FilteringMetricsScope(MetricsLevel metricsLevel, Set<String> metricsEnabledDimensions); @Override void addData(String name, double value, StandardUnit unit); @Override void addData(String name, double value, StandardUnit unit, MetricsLevel level); @Override void addDimension(String name, String value); }
FilteringMetricsScope extends AccumulateByNameMetricsScope { @Override public void addDimension(String name, String value) { if (!metricsEnabledDimensionsAll && (metricsEnabledDimensions == null || !metricsEnabledDimensions.contains(name))) { return; } super.addDimension(name, value); } FilteringMetricsScope();  FilteringMetricsScope(MetricsLevel metricsLevel, Set<String> metricsEnabledDimensions); @Override void addData(String name, double value, StandardUnit unit); @Override void addData(String name, double value, StandardUnit unit, MetricsLevel level); @Override void addDimension(String name, String value);  }