/** * Print non-hierarchical (flat-view) of profiler data. * * @author Kannan */ function print_flat_data($url_params, $title, $flat_data, $sort, $run1, $run2, $limit) { global $stats; global $sortable_columns; global $vwbar; global $base_path; $size = count($flat_data); if (!$limit) { // no limit $limit = $size; $display_link = ""; } else { $display_link = xhprof_render_link(" [ <b class=bubble>display all </b>]", "{$base_path}/?" . http_build_query(xhprof_array_set($url_params, 'all', 1))); } //Find top $n requests $data_copy = $flat_data; $data_copy = _aggregateCalls($data_copy, null, $run2); usort($data_copy, 'sortWT'); $iterations = 0; $colors = array('#4572A7', '#AA4643', '#89A54E', '#80699B', '#3D96AE', '#DB843D', '#92A8CD', '#A47D7C', '#B5CA92', '#EAFEBB', '#FEB4B1', '#2B6979', '#E9D6FE', '#FECDA3', '#FED980'); foreach ($data_copy as $datapoint) { if (++$iterations > 14) { $function_color[$datapoint['fn']] = $colors[14]; } else { $function_color[$datapoint['fn']] = $colors[$iterations - 1]; } } include "../xhprof_lib/templates/profChart.phtml"; include "../xhprof_lib/templates/profTable.phtml"; }
/** * Print non-hierarchical (flat-view) of profiler data. * * @author Kannan */ function print_flat_data($url_params, $title, $flat_data, $sort, $run1, $run2, $limit) { global $stats; global $sortable_columns; global $vwbar; global $base_path; $size = count($flat_data); if (!$limit) { // no limit $limit = $size; $display_link = ""; } else { $display_link = xhprof_render_link(" [ <b class=bubble>display all </b>]", "{$base_path}/?" . http_build_query(xhprof_array_set($url_params, 'all', 1))); } //Find top $n requests $data_copy = $flat_data; $data_copy = _aggregateCalls($data_copy); usort($data_copy, 'sortWT'); include "../xhprof_lib/templates/profChart.phtml"; include "../xhprof_lib/templates/profTable.phtml"; }