GoogleChrome / web-vitals

Essential metrics for a healthy site.
https://web.dev/vitals
Apache License 2.0
7.48k stars 410 forks source link

Cap TTFB in attribution #440

Closed tunetheweb closed 6 months ago

tunetheweb commented 6 months ago

Fixes #439

philipwalton commented 6 months ago

...thinking about this abit more (and having my memory jogged after looking at the bugs in the source code comments), I think it might be better to not report attribution data in cases where the TTFB value is not trustworthy (since an incorrect TTFB value would impact the accuracy of other sub-part timing values as well).

We don't report the TTFB metric in these cases, and I think it would make sense to do that here as well.

tunetheweb commented 6 months ago

OK re-did this to load from single lib function and also return without an attribution model when the TTFB is invalid.