Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

WeChat Gadget Performance Trace Tool


May 18, 2021 WeChat Mini Program Development Document


Table of contents


Starting with WeChat Andoid 6.5.10, we offer trace export tools that developers can use in the developer tool Trace Panel.

How to use it

  1. The adb tool needs to be installed on your PC first, with reference to some of the major tutorials, and you can install it directly using brew on your Mac.
  2. Once you have determined that the adb tool has been successfully installed, open trace Panel on the developer tool, connect your Android phone to your PC via USB, and click "Choose Devices" when the connection authorization box may pop up on your phone, click "Allow."
  3. After selecting the device, open the development version of the program you need to debug on the phone, through the menu in the upper right corner, open the performance monitoring panel, restart the small program;
  4. After the restart, the operation on the small program, after the completion of the operation, through the upper right corner menu, export Trace data;
  5. The Trace file is automatically pulled on the developer tool Trace Panel and the Trace file you want to analyze is selected;

You adb devices to determine if the device is connected to your PC

WeChat Gadget Performance Trace Tool

Performance panel

Starting with WeChat 6.5.8, we provide a performance panel that lets developers understand the performance of small programs. Developers can open the performance panel under the development version of the small program, open the method: go to the development version of the small program, go to the upper right corner more buttons, click "Show performance window."

WeChat Gadget Performance Trace Tool

Performance panel metrics description

index illustrate
CPU The CPU usage of the small program process, only Android is available
RAM Memory occupation of the small program process, only Android is available
Start-up takes time Small programs take time to start
Downloads take time Small package downloads are time-consuming and are downloaded the first time they are opened or when the resource pack needs to be updated
Page switching takes time The time it takes to switch between small program pages
Frame rate/FPS
The first rendering takes time The time it takes for the page to be rendered for the first time
Rendering again takes time Time-consuming for the page to render again (usually triggered by the developer's setData action)
The data cache The size of the cache stored by the program through the Storage interface