const performance = wx.getPerformance() // 获取当前小程序性能相关的信息
const observer = performance.createObserver((entryList) => { // 创建全局性能事件监听器
console.log(entryList.getEntries())
})
observer.observe({ entryTypes: ['render', 'script', 'navigation'] })// 监测这几类性能指标
打印出来得信息字段说明求解释:
duration 指的是该项耗时?startTime和navigationStart有什么不同?
楼主,具体参数看这个链接https://developers.weixin.qq.com/miniprogram/dev/api/base/performance/PerformanceEntry.html
我附加个问题 我的 downloadPackage 下的 packageSize = 0
知道为啥么
"do"downloadPackage"w"downloadPackage"n"downloadPackage""downloadPackage"loadPackage"
没有具体的文档,参考MDN https://developer.mozilla.org/zh-CN/docs/Web/API/PerformanceNavigationTiming
以及这个https://developers.weixin.qq.com/community/develop/doc/0000c6d4608730b3f0fa3ae2f51800?highline=wx.getPerformance%20%E7%9B%B8%E5%85%B3,也是一直没人回复啊,求答复