You are here

function xhprof_print_pc_array in XHProf 7

Same name and namespace in other branches
  1. 6 xhprof.inc \xhprof_print_pc_array()
1 call to xhprof_print_pc_array()
xhprof_symbol_report in ./xhprof.inc
Generates a report for a single function/symbol.

File

./xhprof.inc, line 1035

Code

function xhprof_print_pc_array($url_params, $results, $base_ct, $base_info, $parent, $run1, $run2) {
  global $base_path;
  $rows = array();

  // Construct section title
  $title = $parent ? 'Parent function' : 'Child function';
  if (count($results) > 1) {
    $title = '<strong>' . $title . 's</strong>';
  }
  $rows[] = array(
    array(
      'data' => $title,
      'colspan' => 11,
    ),
  );
  usort($results, 'xhprof_sort_cbk');
  foreach ($results as $info) {
    $row = array();
    $row[] = l($info["fn"], xhprof_path_for_symbol($info["fn"], $run1, $run2));
    $row = array_merge($row, xhprof_pc_info($info, $base_ct, $base_info, $parent));
    $rows[] = $row;
  }
  return $rows;
}