May 19, 2021 WeChat Mini Program Development Document
The base library 2.11.0 starts to support, and the lower version needs to be compatible.
Get information about the performance of the current gadget.
Access to the following types of performance metrics is currently supported:
Category | Name (entryType) | Index |
---|---|---|
Routing | navigation | route, appLaunch |
Rendering | render | firstRender |
Script | script | evaluateScript |
const performance = wx.getPerformance()
const observer = performance.createObserver((entryList) => {
console.log(entryList.getEntries())
})
observer.observe({ entryTypes: ['render', 'script'] })