Fundebug前端JavaScript插件更新至1.5.0,报错附带页面性能指标

栏目: JavaScript · 发布时间: 7年前

内容简介:摘要:使用

摘要: 1.5.0 将在报错数据中附带页面性能指标,辅助用户Debug。

Fundebug前端JavaScript插件更新至1.5.0,报错附带页面性能指标

Performance

使用 Performance 接口,可以获取页面的性能指标,如下:

{
    "redirectCount": 0,
    "type": "navigate",
    "loadEventEnd": 5707.200000004377,
    "loadEventStart": 5702.499999999418,
    "domComplete": 5702.499999999418,
    "domContentLoadedEventEnd": 2112.699999997858,
    "domContentLoadedEventStart": 2071.5999999956694,
    "domInteractive": 2071.5000000054715,
    "unloadEventEnd": 0,
    "unloadEventStart": 0,
    "serverTiming": [],
    "decodedBodySize": 6748,
    "encodedBodySize": 2365,
    "transferSize": 2792,
    "responseEnd": 221.79999999934807,
    "responseStart": 202.00000000477303,
    "requestStart": 164.79999999864958,
    "secureConnectionStart": 106.40000000421423,
    "connectEnd": 163.40000000491273,
    "connectStart": 70.69999999657739,
    "domainLookupEnd": 70.69999999657739,
    "domainLookupStart": 23.9000000001397,
    "fetchStart": 22.400000001653098,
    "redirectEnd": 0,
    "redirectStart": 0,
    "workerStart": 0,
    "nextHopProtocol": "http/1.1",
    "initiatorType": "navigation",
    "duration": 5707.200000004377,
    "startTime": 0,
    "entryType": "navigation",
    "name": "https://www.fundebug.com/"
}

其中 domComplete 即为 html文档完全解析完毕的时间节点 ,其他指标的含义如下图所示:

Fundebug前端JavaScript插件更新至1.5.0,报错附带页面性能指标

在Fundebug控制台的错误详情页面的Performance标签,即可看到收集的性能数据:

Fundebug前端JavaScript插件更新至1.5.0,报错附带页面性能指标

另外,我们只是在报错的时候收集Performance指标,目的是辅助用户Debug。Fundebug目前专注于BUG监控,没有提供全方位的性能监控服务的打算。

silentPerformance

如果你不需要报错的时候附带页面性能指标,则可以将silentPerformance属性设为true。

  • 在HTML中配置 <script> 标签中配置silentPerformance属性
<script src="https://js.fundebug.cn/fundebug.1.5.0.min.js" 
            apikey="API-KEY" 
            silentPerformance=true></script>
  • 在JavaScript中配置silentPerformance变量
if ("fundebug" in window) {
   fundebug.silentPerformance = true;
}

参考

关于Fundebug

Fundebug专注于JavaScript、微信小程序、微信小游戏、支付宝小程序、React Native、Node.js和 Java 实时BUG监控。 自从2016年双十一正式上线,Fundebug累计处理了8亿+错误事件,得到了Google、360、金山软件、百姓网等众多知名用户的认可。欢迎免费试用!

Fundebug前端JavaScript插件更新至1.5.0,报错附带页面性能指标


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Computer Age Statistical Inference

Computer Age Statistical Inference

Bradley Efron、Trevor Hastie / Cambridge University Press / 2016-7-21 / USD 74.99

The twenty-first century has seen a breathtaking expansion of statistical methodology, both in scope and in influence. 'Big data', 'data science', and 'machine learning' have become familiar terms in ......一起来看看 《Computer Age Statistical Inference》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具