- protected function getSummaryReport( $header = '', $footer = '' ) {
- $data = $this->xhprof->getInclusiveMetrics();
- uasort( $data, Xhprof::makeSortFunction( 'wt', 'total' ) );
-
- $format = '%6.2f%% %3.6f %6d - %s';
- $out = array( $header );
- foreach ( $data as $func => $stats ) {
- $out[] = sprintf( $format,
- $stats['wt']['percent'],
- $stats['wt']['total'] / 1e6,
- $stats['ct'],
- $func
- );
- }
- $out[] = $footer;
- return implode( "\n", $out );