You are here

public function BaseParser::getMetrics in XHProf 8

Return value

array

2 calls to BaseParser::getMetrics()
BaseParser::computeFlatInfo in src/XHProfLib/Parser/BaseParser.php
BaseParser::computeInclusiveTimes in src/XHProfLib/Parser/BaseParser.php

File

src/XHProfLib/Parser/BaseParser.php, line 150

Class

BaseParser
Class BaseReport

Namespace

Drupal\xhprof\XHProfLib\Parser

Code

public function getMetrics() {

  // get list of valid metrics
  $possible_metrics = $this
    ->getPossibleMetrics();

  // return those that are present in the raw data.
  // We'll just look at the root of the subtree for this.
  $metrics = [];
  foreach ($possible_metrics as $metric => $desc) {
    $mainMetric = $this->mainSymbol
      ->getMetric($metric);
    if (isset($mainMetric)) {
      $metrics[] = $metric;
    }
  }
  return $metrics;
}