Zizzamia / perfume.js

Web performance library for measuring all performance vitals metrics
https://zizzamia.github.io/perfume/
MIT License
3.12k stars 109 forks source link

Why is the delay for TBT reporting 10 seconds, why not 5? #262

Open SKNlEI opened 4 months ago

SKNlEI commented 4 months ago

// TODO Add docs if ('FID' === name) { setTimeout(() => { if (visibility.didChange) { return; } logMetric({ attribution, name: 'TBT', rating: getVitalsScore('TBT', tbt.value), value: tbt.value, navigationType, }); logData('dataConsumption', rt.value); }, 10000); }

Is there any basis for this timing?

reference address:https://web.developers.google.cn/articles/tbt?hl=en Total Blocking Time (TBT) is an important lab metric for measuring load responsiveness. It measures the total time after First Contentful Paint (FCP) where the main thread was blocked for long enough to prevent responses to user input. A low TBT helps ensure that the page is usable.

By default, Lighthouse stops monitoring TBT after Time to Interactive (TTI), as do some other lab tools that measure page load. For more information, see How does TBT relate to TTI?.