You are here

protected function XHProfParser::calculatePercentages in XHProf 7

Same name and namespace in other branches
  1. 6 XHProfLib/XHProfParser.php \XHProfParser::calculatePercentages()
1 call to XHProfParser::calculatePercentages()
XHProfParser::getMetrics in XHProfLib/XHProfParser.php

File

XHProfLib/XHProfParser.php, line 57

Class

XHProfParser

Code

protected function calculatePercentages($symbol_metrics) {
  foreach ($symbol_metrics as $metric => $value) {
    if ($this->totals[$metric] !== 0) {
      $symbol_metrics[$metric . '%'] = $value / $this->totals[$metric];
    }
  }
  return $symbol_metrics;
}