private function parseMetrics(\DOMXPath $xpath, \DOMNode $rootNode)
    {
        $metrics = [];

        foreach ($xpath->query(self::METRICS_PATH, $rootNode) as $metricNode) {
            $metric = [];
            foreach ($metricNode->attributes as $attribute) {
                $metric[$attribute->name] = $attribute->value;
            }
            $metrics[$metric['name']] = $metric;
        }

        return $metrics;
    }
private function parseMetrics(\DOMXPath $xpath, \DOMNode $rootNode)
    {
        $metrics = [];

        foreach ($xpath->query(self::METRICS_PATH, $rootNode) as $metricNode) {
            $metric = [];
            foreach ($metricNode->attributes as $attribute) {
                $metric[$attribute->name] = $attribute->value;
            }
            $metrics[$metric['name']] = $metric;
        }

        return $metrics;
    }
private function parseMetrics ( \ DOMXPath $ xpath , \ DOMNode $ rootNode ) { $ metrics = [ ] ; foreach ( $ xpath -> query ( self :: METRICS_PATH , $ rootNode ) as $ metricNode ) { $ metric = [ ] ; foreach ( $ metricNode -> attributes as $ attribute ) { $ metric [ $ attribute -> name ] = $ attribute -> value ; } $ metrics [ $ metric [ 'name' ] ] = $ metric ; } return $ metrics ; }
Parse metrics from a bucket.

@param \DOMXPath $xpath    XPath access to the document parsed.
@param \DOMNode  $rootNode Aggregation node to be parsed.

@return array
Parse metrics from a bucket .