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

1,390 阅读1分钟

本文只讨论跟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

image.png

按照城市来排序:

image.png

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

image.png

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

image.png

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

image.png

按照网络类型来排序:

image.png

会话角度,

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

image.png

浏览器:

image.png

os:

image.png

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

image.png

网络类型

image.png

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

image.png

我去查看一下代码发现:

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

screen_size:

image.png