-
Notifications
You must be signed in to change notification settings - Fork 101
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
Enhance Server-Timing implementation to support new Chrome DevTools Performance Panel integration #1578
base: trunk
Are you sure you want to change the base?
Conversation
…naming with start/end terminology.
…nclude non-standard response-start and response-end metrics automatically, if possible.
@felixarntz we already have #1487 for this |
@swissspidy Oops, I must have missed that. Looks like we did a few things differently though, so worth comparing the two approaches. We can either align in this PR or the other one, that doesn't really matter. Biggest differences I see:
Let me know your thoughts. |
That's something that can be addressed with a little validation. And even without validation, nothing breaks and a developer can fix this easily once they realize their
I'm actually not a huge fan of this enforcement. I think there shouldn't be any prefix by default, so that core can use
Both PRs have special handling for If we drop the prefix requirement, then the special handling in my POC goes away entirely.
That's an easy fix. My PR was a quick POC, I simply didn't test with output buffering disabled.
It's not required, but it is used. Actually, after my recommendation, the team added support for So the change is very much related. Of course it can also be added in a separate PR and merged independently of the rest, as it is a useful change by itself.
This one I see as an unrelated change. This can be done in a separate PR.
Nothing that can't be solved in the other PR. Though personally I'm wary of adding too much validation and |
We probably need to discuss the path forward further. Some of your replies look reasonable to me, while I disagree with others. A few notes:
|
That's why I said it's something that can be addressed with a little validation. My PR was a quick POC, I didn't spend much time on edge cases like this.
Technically this is not part of the Server-Timing specification. It's part of a non-standard extension that isn't in any specification. The spec only knows |
👍
Exactly. I think we're saying the same thing. |
Summary
Fixes #
Relevant technical choices
$start_value
property (formerly called$before_value
) of Server-Timing metrics via new methods.$start_value
property to now store values in milliseconds instead of seconds. This is fine because the value could never be set from outside the class, so we have full control over it.measure_start()
andmeasure_end()
, replacing the now deprecatedmeasure_before()
andmeasure_after()
(mostly in accordance with the better naming encouraged by the new Chrome integration.response-start
andresponse-end
, which are used to provide timing context to the browser so that the browser can display Server-Timing metrics correctly in relation to the other client-side metrics. This is relevant as the server-side clock may be off in comparison to the browser clock.Testing