djlxiaoshi / blog

7 stars 0 forks source link

Markdown 样式测试 #14

Open djlxiaoshi opened 3 years ago

djlxiaoshi commented 3 years ago

标题1

标题2

标题3

标题4

标题5

sdgfsdgdsgds

指标 描述 计算方式 意义
unload 前一个页面卸载耗时 unloadEventEnd - unloadEventStart
redirect 重定向耗时 redirectEnd - redirectStart 重定向的时间
appCache 缓存耗时 domainLookupStart - fetchStart 读取缓存的时间
DNS时间 DNS时间 domainLookupEnd - domainLookupStart 可观察域名解析服务是否正常
TCP握手时间 TCP握手时间 connectEnd - connectStart 建立连接的耗时
ssl SSL 安全连接耗时 connectEnd - secureConnectionStart 反映数据安全连接建立耗时
TTFB(首字节时间) TTFB是发出页面请求到接收到应 答数据第一个字节所花费的毫秒数 responseStart – requestStart
// FMP
// 前提设置某个DOM元素的elementtiming属性值为meaningful
new PerformanceObserver((entryList, observer) => {
    let perfEntries = entryList.getEntries();
    FMP = perfEntries[0];//startTime 2000以后
    observer.disconnect();//不再观察了
}).observe({ entryTypes: ['element'] });//观察页面中的意义的元素

observer.disconnect(); 行内代码块

5 分钟撸一个前端性能监控工具

图片测试

djlxiaoshi commented 3 years ago

test