Opened 19 months ago
Last modified 5 months ago
#59120 new defect (bug)
Measure interactivity metrics in performance tests
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | |
Focuses: | performance | Cc: |
Description
This is a follow-up to #58360.
While we have some good load time metrics so far, we don't measure interactivity metrics yet.
We're particularly looking at these 3 metrics:
- Total Blocking Time (TBT)
- First Input Delay (FID)
- Interaction to Next Paint (INP)
They can be measured using libraries like Lighthouse or https://github.com/GoogleChrome/web-vitals.
Interactivity metrics require some sort of interaction during the test, so we need to figure out specifics.
Change History (2)
#2
@
5 months ago
On the one hand, I'd argue we don't need to measure TBT because FID and INP are far more meaningful.
On the other hand, the reason TBT is used in some tooling is because it's the only way to reliably get a glimpse of interactivity in automated tests. The problem with both FID and INP is that they require actual interactions to happen. How could we implement that in a way that works across our test suites? What would the interactions be that we implement? I feel like this may end up an arbitrary decision, so I'm not sure about how feasible it is.
In other words, I think we should implement either FID and INP or TBT. The first one would be ideal, but the latter may be realistically the only option.
Note that TBT is a lab metric that is not covered by web-vitals.js
In JS it could be done with something like
(source)