private Collection < MetricDatum > filterOSMetrics ( Collection < MetricDatum > data ) { Collection < MetricDatum > output = new ArrayList < MetricDatum > ( data . size ( ) ) ; for ( MetricDatum datum : data ) { if ( ! OS_METRIC_NAME . equals ( datum . getMetricName ( ) ) ) output . add ( datum ) ; } return output ; }
Return a collection of metrics almost the same as the input except with all OS metrics removed .