You are here

function theme_xhprof_overall_summary in XHProf 7

Same name and namespace in other branches
  1. 6 xhprof.module \theme_xhprof_overall_summary()

Theme function to display XHProf run summary.

1 theme call to theme_xhprof_overall_summary()
xhprof_full_report in ./xhprof.inc
Generates a tabular report for all functions. This is the top-level report.

File

./xhprof.module, line 428

Code

function theme_xhprof_overall_summary($variables) {
  $output = '';

  // Extract variables: $totals, $possible_metrics, $metrics, $display_calls;
  extract($variables);
  $rows = array();
  foreach ((array) $metrics as $metric) {
    $rows[] = array(
      '<strong>Total ' . xhprof_stat_description($metric) . ':</strong>',
      number_format($totals[$metric]) . " " . $possible_metrics[$metric][1],
    );
  }
  if ($display_calls) {
    $rows[] = array(
      "<strong>Number of function xhprof_Calls:</strong>",
      number_format($totals['ct']),
    );
  }
  $header = array(
    array(
      'data' => 'Overall Summary',
      'colspan' => 2,
    ),
  );
  $attributes = array(
    'class' => array(
      'xhprof-table',
      'xhprof-summary-table',
    ),
  );
  $output .= theme('table', array(
    'header' => $header,
    'rows' => $rows,
    'attributes' => $attributes,
  ));
  return $output;
}