function xhprof_print_pct in XHProf 7
Same name and namespace in other branches
- 6 xhprof.inc \xhprof_print_pct()
Prints a <td> element with a pecentage.
3 calls to xhprof_print_pct()
- xhprof_full_report in ./
xhprof.inc - Generates a tabular report for all functions. This is the top-level report.
- xhprof_print_flat_data in ./
xhprof.inc - Print non-hierarchical (flat-view) of profiler data.
- xhprof_symbol_report in ./
xhprof.inc - Generates a report for a single function/symbol.
1 string reference to 'xhprof_print_pct'
File
- ./
xhprof.inc, line 729
Code
function xhprof_print_pct($numer, $denom, $bold = FALSE, $attributes = NULL) {
global $vbar;
global $vbbar;
global $diff_mode;
$class = xhprof_get_print_class($numer, $bold);
if ($denom == 0) {
$pct = "N/A%";
}
else {
$pct = xhprof_percent_format($numer / abs($denom));
}
return "<span class='{$class}'>{$pct}</span>";
}