Index: branches/REL1_4/phase3/includes/Profiling.php |
— | — | @@ -177,9 +177,10 @@ |
178 | 178 | } |
179 | 179 | |
180 | 180 | function getFunctionReport() { |
181 | | - $width = 125; |
182 | | - $format = "%-" . ($width - 34) . "s %6d %6.3f %6.3f %7.3f%% %6d (%6.3f-%6.3f) [%d]\n"; |
183 | | - $titleFormat = "%-" . ($width - 34) . "s %9s %9s %9s %9s %9s %9s %9s %9s\n"; |
| 181 | + $width = 140; |
| 182 | + $nameWidth = $width - 65; |
| 183 | + $format = "%-{$nameWidth}s %6d %9.3f %9.3f %9.3f%% %6d (%9.3f -%9.3f) [%d]\n"; |
| 184 | + $titleFormat = "%-{$nameWidth}s %6s %13s %13s %13s %6s %14s %14s %9s\n"; |
184 | 185 | $prof = "\nProfiling data\n"; |
185 | 186 | $prof .= sprintf( $titleFormat, 'Name', 'Calls', 'Total', 'Each', '%', |
186 | 187 | 'Mem', 'Min', 'Max', 'Overhead' ); |
— | — | @@ -264,7 +265,7 @@ |
265 | 266 | $calls = $this->mCalls[$fname]; |
266 | 267 | $percent = $total ? 100. * $elapsed / $total : 0; |
267 | 268 | $memory = $this->mMemory[$fname]; |
268 | | - $prof .= sprintf( $format, substr( $fname, 0, $width-34), $calls, (float)($elapsed * 1000), |
| 269 | + $prof .= sprintf( $format, substr( $fname, 0, $nameWidth), $calls, (float)($elapsed * 1000), |
269 | 270 | (float)($elapsed * 1000) / $calls, $percent, $memory, |
270 | 271 | ($this->mMin[$fname] * 1000.0), |
271 | 272 | ($this->mMax[$fname] * 1000.0), |