You are here

function drush_xhprof_list in XHProf 6

Same name and namespace in other branches
  1. 8 xhprof.drush.inc \drush_xhprof_list()
  2. 7 xhprof.drush.inc \drush_xhprof_list()

A command callback.

File

./xhprof.drush.inc, line 105

Code

function drush_xhprof_list() {
  $runs = drush_xhprof_get_runs();
  $rows = array();
  $headers = array();
  foreach ($runs as $run) {
    $row = array();
    foreach ($run as $key => $value) {
      if (!in_array($key, $headers)) {
        $headers[] = $key;
      }
      $row[] = $value;
    }
    $rows[] = array_reverse($row);
  }
  $headers = array_reverse($headers);
  array_unshift($rows, $headers);
  drush_print_table($rows, TRUE);
}