Performance tests: add more detailed loading metrics#32237
Conversation
|
Size Change: 0 B Total Size: 1.07 MB ℹ️ View Unchanged
|
5f2e1f8 to
87d5f2c
Compare
|
This is hugely helpful for improving loading performance and tracking down regressions. It will work old releases as well. It's a fairly small and isolated change so merging soon if there's no objections. |
youknowriad
left a comment
There was a problem hiding this comment.
This is cool. Should we take this to improve our "perf metrics" documentation with all the measures. (the description of the PR is helpful) https://developer.wordpress.org/block-editor/explanations/architecture/performance/#metrics
|
Do you think the measures after first byte should subtract the "first byte" one to get more stable results across runs (exclude server/latency flakiness) |
|
@youknowriad Yeah, been thinking about that. I don't see it being done normally in performance metrics, so I'm hesitant about it. I'm actually changing it to |
|
@ellatrix about the subtraction, I don't feel strongly right now, so we can do whatever you think is best for now. |
|
I'm subtracting it, it does make sense. It could be a bit misleading for other times, for example you may think that time to first block includes the server response time. I'll just add a comment so that's clear. |
c103460 to
f6a096b
Compare
|
It's interesting that trunk's first paint (since response end) is five times quicker than this branch. Rebased to see it changes anything. |
f6a096b to
86f0b68
Compare
86f0b68 to
7ff2938
Compare
|
Let's merge this. It only modifies the tests. We really need some more detailed metrics for loading. |
| serverResponse: average( results.serverResponse ), | ||
| firstPaint: average( results.firstPaint ), | ||
| domContentLoaded: average( results.domContentLoaded ), | ||
| loaded: average( results.loaded ), |
There was a problem hiding this comment.
Do you think we can restore the "load" metric (in addition to these). I know it's not perfect but the history of http://codehealth.vercel.app relies on it. We can update the dashboards to use the other tools later.
Description
Adds more detailed loading metrics. Currently it's hard to measure any improvements made without seeing more fine grained results.
requestStartandresponseStart.responseEnd.DOMContentLoadedevent completes. SeedomContentLoadedEventEnd. (TheDOMContentLoadedevent fires when the initial HTML document has been completely loaded and parsed, without waiting for stylesheets, images, and subframes to finish loading.)loadEventEnd. (Theloadevent is fired when the whole page has loaded, including all dependent resources such as stylesheets and images.)How has this been tested?
Check the performance job.
Screenshots
Types of changes
Checklist:
*.native.jsfiles for terms that need renaming or removal).