Search in sources :

Example 1 with MetricInfo

use of org.platformlayer.metrics.model.MetricInfo in project platformlayer by platformlayer.

the class MetricCollector method populateMetricInfo.

static void populateMetricInfo(MetricInfoCollection metricInfoCollection, String prefix, MetricConfig metrics) {
    if (metrics.metric != null) {
        for (Metric metric : metrics.metric) {
            MetricInfo metricInfo = new MetricInfo();
            metricInfo.key = (prefix + metric.key);
            metricInfoCollection.metricInfoList.add(metricInfo);
        }
    }
    if (metrics.metrics != null) {
        for (MetricConfig subtree : metrics.metrics) {
            String childPrefix = prefix + subtree.key + "/";
            populateMetricInfo(metricInfoCollection, childPrefix, subtree);
        }
    }
}
Also used : MetricConfig(org.platformlayer.ops.model.metrics.MetricConfig) MetricInfo(org.platformlayer.metrics.model.MetricInfo) Metric(org.platformlayer.ops.model.metrics.Metric)

Aggregations

MetricInfo (org.platformlayer.metrics.model.MetricInfo)1 Metric (org.platformlayer.ops.model.metrics.Metric)1 MetricConfig (org.platformlayer.ops.model.metrics.MetricConfig)1