In case the Chrome User Experience Report does not have sufficient real-world speed data for the page, the response of the PSI API (v5) does contain values for all properties of loadingExperience in the response. These values are exactly the same as the values for originLoadingExperience. The problem with this is that from the API response you can't know if the data in loadingExperience is valid or the duplicate of originLoadingExperience. Sure, it's possible to compare all those values and if all match exactly it is kinda safe to conclude it's a case of duplication, but this is not bullet-proof and requires extra code.

Is there a way to reliably know from the API response if CRuX did not have sufficient data for the page?

1

There are 1 best solutions below

0
Rick Viscomi On

Yes I've seen this too and I consider it a bug in the PSI API. I've already flagged it with the PSI team suggesting that they include an error message in the loadingExperience field to clarify that it doesn't have sufficient data for the page.