You are here

public function Report::getSummary in XHProf 8

Return value

mixed

Overrides ReportInterface::getSummary

File

src/XHProfLib/Report/Report.php, line 67

Class

Report
Class Report

Namespace

Drupal\xhprof\XHProfLib\Report

Code

public function getSummary() {
  $summary = [];
  $totals = $this
    ->getTotals();
  foreach ($this
    ->getMetrics() as $metric) {
    $summary[$metric] = $this
      ->getValue($totals[$metric], $metric);
  }
  if ($this
    ->getDisplayCalls()) {
    $summary['ct'] = $this
      ->getValue($totals['ct'], 'ct');
  }
  return $summary;
}