public function XHProfDiffParser::getDiffTotals in XHProf 6
Same name and namespace in other branches
- 7 XHProfLib/XHProfDiffParser.php \XHProfDiffParser::getDiffTotals()
File
- XHProfLib/
XHProfDiffParser.php, line 17
Class
Code
public function getDiffTotals() {
$diff_totals[0] = $this->parser1
->getTotals();
$diff_totals[1] = $this->parser2
->getTotals();
$diff_totals['diff'] = array();
$diff_totals['diff%'] = array();
foreach ($diff_totals[0] as $metric => $value) {
$diff_totals['diff'][$metric] = $diff_totals[1][$metric] - $value;
$diff_totals['diff%'][$metric] = ($diff_totals[1][$metric] / $value - 1) * 100;
}
return $diff_totals;
}