0
点赞
收藏
分享

微信扫一扫

用户体验可观测性之-long task初认识

本文只讨论跟long task 相关内容,自我学习。

def

Long Task is a new performance metric API that can be used for measuring the responsiveness of an application and helps developers to understand the bad user experience on the website. It enables detecting CPU intensive tasks that block the UI thread for extended periods (greater than 50 milliseconds) and block other critical tasks from being executed (eg: reacting to user input).

related index

首当前冲的是session_long_task_count,即当前会话产生长任务次数,第二个指标是view_long_task_count,即每次页面加载时产生的长任务个数,第三个指标是long_task | 对于浏览器中的任何阻塞主线程超过50ms的任务,都会生成一条长任务记录,最后是action_long_task_count,操作关联长任务次数。

related explore

用户体验可观测性之-long task初认识_UI

按照城市来排序:

用户体验可观测性之-long task初认识_UI_02

## 按照浏览器来排序,(browser浏览器提供商)

用户体验可观测性之-long task初认识_网络类型_03

按照操作系统(os)来排序:

用户体验可观测性之-long task初认识_UI_04

按照屏幕大小(screen_size)来排序:

用户体验可观测性之-long task初认识_网络类型_05

按照网络类型来排序:

用户体验可观测性之-long task初认识_性能优化_06

会话角度,

session_long_task_count,当前会话产生长任务次数 按照城市来排序:

用户体验可观测性之-long task初认识_前端_07

浏览器:

用户体验可观测性之-long task初认识_网络类型_08

os:

用户体验可观测性之-long task初认识_前端_09

screen_size,屏幕宽度*高度,分辨率

用户体验可观测性之-long task初认识_UI_10

网络类型

用户体验可观测性之-long task初认识_性能优化_11

network_type,网络连接类型,属性值参考: wifi | 2g | 3g | 4g | 5g | unknown(未知网络)| unreachable(网络不可用),不过这里有个cellular

用户体验可观测性之-long task初认识_UI_12

我去查看一下代码发现:

用户体验可观测性之-long task初认识_前端_13

原来如此,看来不能光看文档,也要看代码和实际情况。

screen_size:

用户体验可观测性之-long task初认识_前端_14

举报

相关推荐

0 条评论