When does start the timer for metrics like First Input Delay, First Contentful Paint?

huangapple go评论101阅读模式
英文:

When does start the timer for metrics like First Input Delay, First Contentful Paint?

问题

我们正在使用Google PageSpeed Insights获取我们网站https://developers.google.com/speed/docs/insights/v5/get-started的Lighthouse数据。在我们的团队中,我们有一个内部讨论,我们没有得出任何结论,也找不到答案。

像首次内容绘制(First Contentful Paint)和首次输入延迟(First Input Delay)这样的指标的时间测量是从何时开始的?

它们是否包括了时间到第一个字节(Time to First Byte)+下载HTML的时间,还是测量是从HTML页面下载完成的那一刻开始的?

谢谢。

英文:

We're using the Google PageSpeed Insights to get the lighthouse data for our site https://developers.google.com/speed/docs/insights/v5/get-started. In our team we've an internal discussion which we don't get any conclusion and we don't find the answer.

When does the time measurement for metrics like First Contentful paint, First input delay starts?

Does they include the time to first byte + the time to donwload the html or they measurement starts from the moment the html page has be donwloaded?

Thanks.

答案1

得分: 2

First Contentful Paint(首次内容绘制)从导航开始时开始计时。对于PageSpeed Insights顶部的实际用户数据,它是从实际用户导航到页面时开始计时的,因此可能包括重定向,以及页面实际开始加载之前的任何连接设置时间(DNS/TCP/HTTPS时间)。对于下面的Lighthouse模拟,它将从测试开始时计时。

第一次输入延迟(FID)在实际用户部分是从发生输入(例如用户点击按钮)开始计时,直到主线程空闲以开始处理这些事件处理程序。在Lighthouse中没有与之等效的操作,因为Lighthouse不进行交互。总阻塞时间(TBT)可以指示页面加载期间是否发生了大量工作,这可能是高FID的原因。

英文:

> When does the time measurement for metrics like First Contentful pain, First input delay starts?

First Contentful Paint starts from when the navigation starts. For the real user data at the top of PageSpeed Insights this comes from when real users navigate to a page so it may include redirects as well as any connection setup time (DNS/TCP/HTTPS time) before the page actually starts loading. For the Lighthouse simulation below this it will be from the start of the test.

First Input Delay (FID) in the real user section is from when an input happens (e.g. a user clicks on a button), until the main thread is free to start processing those event handlers. There is no Lighthouse equivalent as Lighthouse does not do interactions. Total Blocking Time (TBT) can indicate if there is a lot of work happening during page load which can be a cause of high FIDs.

huangapple
  • 本文由 发表于 2023年6月5日 23:07:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/76407772.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定