美文网首页
日志监控

日志监控

作者: jluemmmm | 来源:发表于2020-09-02 20:35 被阅读0次

性能监控

利用window.performance进行性能上报,包括白屏时间与相关资源加载时间
如何进行 web 性能监控

var time = window.performance.timing;
var fptValue = time.responseEnd - time.fetchStart;
var loadValue = time.loadEventStart - time.fetchStart;

window.addEventListener('load', function () {
  performanceReport();
});

前端监控 中有各性能采集指标

初探 performance – 监控网页与程序性能 中有各时间节点的介绍

前端性能监控:window.performance

统计指标说明

promise错误捕获

unhandledrejection捕获被reject但没有reject处理器的错误

页面生命周期

  • DOMContentLoaded 在前,加载完html并构建dom
  • load 在后,加载完所有外部资源

页面生命周期:DOMContentLoaded,load,beforeunload,unload
再谈 load 与 DOMContentLoaded

async、defer与DOMContentLoaded的执行先后关系

相关文章

网友评论

      本文标题:日志监控

      本文链接:https://www.haomeiwen.com/subject/zqscsktx.html