zoukankan      html  css  js  c++  java
  • 前端监控之性能测速

    一、意义:
      网站性能往往决定用户体验,网页加载是否够快,操作是否流畅往往是用户对网站的第一印象,性能越好的网站,转化率、用户留存率往往更好。

    二、捕获方法:
    通过window.performance获取以下六个指标
      1、First Contentful Paint (FCP):开始呈现页面内容
      2、Largest Contentful Paint (LCP):视口内可见的最大图像或文本块的渲染时间
      3、TTFB:接收到响应的第一个字节
      4、First Input Delay (FID):第一次进行交互的时间
      5、Ready:文档已被解析
      6、Load:所有资源完成加载
    FCP即首屏时间,LCP为用户看到页面的最大块,Load为页面加载完成,一般根据这三个指标综合看该网页性能。

    三、上报参数:
    捕获的以上六个指标进行上报
      1、path: string // 页面url
      2、d1: number|undefined // TTFB时间
      3、d2: number|undefined // FCP
      4、d3: number|undefined // LCP
      5、d4: number|undefined // FID
      6、d5: number|undefined // Ready
      7、d6: number|undefined // Load
      8、detail: string // duration超过500ms文件,字符串数组

    更快捷更准确接入前端监控

  • 相关阅读:
    python斐波那契数列
    python装饰器
    Python文件操作
    python 第三方库的安装方法
    Ajax 基本使用学习记录
    微分方程概述
    Typora中的数学公式
    Ubuntu20.04 安装 mysql8.0 之后 root 账户无法登录
    Ubuntu20.04换源之后依旧慢?如何更有效的换源
    Ubuntu18.04更新python版本
  • 原文地址:https://www.cnblogs.com/chenjef/p/14731963.html
Copyright © 2011-2022 走看看