Commit 26224d8
committed
refactor: change method used to report statistics.
The old way used a hard coded list of timing statistics. It could be
translated, but required revising every time a new stat was added.
The elapsed time is always calculated, so keep that as a translatable
item.
Now dump all other stats in the timing dict. I can add new timing
values and get them dumped without addition changes.
Also check the type of the result. Only process timing if it's
text/html. I can't report it otherwise. Also templates like
_generic.translation can override the result type. Before it was
generating stats for every request even if it couldn't display
it. Also if '</body>' showed up in a js file or a comment in an image
file doing the substitution would break the data.1 parent e277f9c commit 26224d8
1 file changed
Lines changed: 20 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2510 | 2510 | | |
2511 | 2511 | | |
2512 | 2512 | | |
2513 | | - | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
2514 | 2525 | | |
2515 | | - | |
| 2526 | + | |
2516 | 2527 | | |
2517 | | - | |
| 2528 | + | |
2518 | 2529 | | |
2519 | 2530 | | |
2520 | 2531 | | |
2521 | | - | |
| 2532 | + | |
2522 | 2533 | | |
2523 | 2534 | | |
2524 | | - | |
2525 | | - | |
2526 | | - | |
2527 | | - | |
2528 | | - | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
2529 | 2540 | | |
2530 | 2541 | | |
2531 | 2542 | | |
| |||
0 commit comments