You are here

function xhprof_print_pct in XHProf 6

Same name and namespace in other branches
  1. 7 xhprof.inc \xhprof_print_pct()

Prints a <td> element with a pecentage.

6 calls to xhprof_print_pct()
theme_xhprof_run_table in ./xhprof.module
Theme function to display list of XHProf function calls.
xhprof_full_report in ./xhprof.inc
Generates a tabular report for all functions. This is the top-level report.
xhprof_pc_info in ./xhprof.inc
Print info for a parent or child function xhprof_in the parent & children report.
xhprof_print_flat_data in ./xhprof.inc
Print non-hierarchical (flat-view) of profiler data.
xhprof_print_function_info in ./xhprof.inc
Print "flat" data corresponding to one function.

... See full list

File

./xhprof.inc, line 745

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>";
}