New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add HTTP debug header, #593 #624
Conversation
By analyzing the blame information on this pull request, we identified @pascalchevrel, @TheoChevalier and @flodolo to be potential reviewers |
Since the code is basically the same of |
. 'MB)'; | ||
$render_time = 'Elapsed time (s) ' | ||
. round((microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']), 4); | ||
header('Transvision-perf: ' . $memory . ' ; ' . $render_time); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for an extra space before the semicolon.
nit for the description: http header -> HTTP header
2b6541a
to
987bd92
Compare
He log in error_log and HTTP header in the same time now. |
Unfortunately this generates an error in the log:
It should be OK to move the call from dispatcher to the base template (but need to be verified thoroughly) |
This is too simplistic an approch :) The right approach is to split the function in 3: Then in the dispatcher, we use output buffering and at the end of the dispatcher, we print the buffers like that: print $perf_header . $content; That's actually moving what we do in base.php to the dispatcher. I have a working patch so maybe I could take the bug. |
Replaced by #637 |
As requested in #593, there is now the memory comsuption and the time elapsed in a HTTP header if perf_debug is true