You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Lighthouse简介
Lighthouse 是 Google Chrome 推出的一款自动化的开源审查工具,旨在提升网页的质量。该工具可让开发者针对性能、可访问性、渐进式网页应用兼容性等方面运行审查,以便为改进网站质量提供一条“光明大道”。
Lighthouse公式原理
Lighthouse 收集完性能指标(大多数情况下会以毫秒为单位进行报告)后,它会查看指标值在其 Lighthouse 评分分布中所处的位置,将每个原始指标值转换为从 0 到 100 的指标得分。评分分布是对数正态分布,根据 HTTP Archive 上真实网站性能数据的性能指标得出。
例如,Largest Contentful Paint (LCP) 会衡量用户感知到页面的最大内容可见的情况。LCP 的指标值表示从用户启动网页加载到网页呈现其主要内容之间的时长。根据实际网站数据,效果最佳的网站会在大约 1220 毫秒内呈现 LCP,因此,该指标值对应的得分为 99。
再深入一点,Lighthouse 评分曲线模型使用 HTTPArchive 数据来确定两个控制点,然后设置 log-normal 曲线的形状。HTTPArchive 数据的第 25 个百分位将变为 50(中位数控制点),第 8 个百分位将变为 90(良好/绿色控制点)。在浏览下方的评分曲线图时,请注意,指标值与得分之间存在接近线性关系,在 0.50 到 0.92 之间。 0.96 左右的得分是上面的“收益递减点”,该曲线会拉远,需要越来越多的指标改进才能提高已经达到的高分。

在先进性的应用
当前用于将评估维度的得分从1分制转换为百分制
优点
缺点(待改进)
Beta Was this translation helpful? Give feedback.
All reactions