A MetricSink that discards all records.
| 25 | * A MetricSink that discards all records. |
| 26 | */ |
| 27 | public 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected