private static Collection < String > getAvailableMetrics ( Collection < ? extends MetricStore . ComponentMetricStore > stores ) { Set < String > uniqueMetrics = new HashSet <> ( 32 ) ; for ( MetricStore . ComponentMetricStore store : stores ) { uniqueMetrics . addAll ( store . metrics . keySet ( ) ) ; } return uniqueMetrics ; }
Returns a JSON string containing a list of all available metrics in the given stores . Effectively this method maps the union of all key - sets to JSON .