MCPcopy Create free account
hub / github.com/grpc/grpc-java / NoopMetricSink

Class NoopMetricSink

api/src/testFixtures/java/io/grpc/NoopMetricSink.java:27–49  ·  view source on GitHub ↗

A MetricSink that discards all records.

Source from the content-addressed store, hash-verified

25 * A MetricSink that discards all records.
26 */
27public class NoopMetricSink implements MetricSink {
28 private int size;
29
30 @Override
31 public Map<String, Boolean> getEnabledMetrics() {
32 return Collections.emptyMap();
33 }
34
35 @Override
36 public Set<String> getOptionalLabels() {
37 return Collections.emptySet();
38 }
39
40 @Override
41 public synchronized int getMeasuresSize() {
42 return size;
43 }
44
45 @Override
46 public synchronized void updateMeasures(List<MetricInstrument> instruments) {
47 size = instruments.size();
48 }
49}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected