May 20, 2021 WeChat Mini Program Development Document
This interface should be called on the server side, as detailed in the Service Side API.
Performance monitoring
POST https://api.weixin.qq.com/wxaapi/log/get_performance?access_token=ACCESS_TOKEN
Property | Type | The default | Required | Description |
---|---|---|---|---|
access_token | string | Is | The interface calls the credentials | |
cost_time_type | number | Is | Optional values 1 (total start-up time), 2 (download time), 3 (initial rendering time) | |
default_start_time | number | Yes | Query start time | |
default_end_time | number | Yes | Query end time | |
device | string | Yes | System platform, optional value "@_all:" (all), 1 (ios), 2 (Android) | |
is_download_code | string | Yes | Whether to download the code package, take effect when Type is 1, optional value "@_all:" (all), 1 (y), 2 (no) | |
scene | string | Yes | Access source, take effect when Type is 1 or 2, get it through the GetScenelist interface | |
networktype | string | Yes | Network environment, when Type is 2, select value "@_all:", WiFi, 4G, 3G, 2G |
{
"cost_time_type": 2,
"default_start_time": 1572339403,
"default_end_time": 1574931403,
"device": "@_all",
"networktype": "@_all",
"scene": "@_all",
"is_download_code": "@_all"
}
Attributes | type | illustrate |
---|---|---|
errcode | number | error code |
errmsg | string | Error message |
default_time_data | string | Error query data (JSON string, strbody as follows) |
compare_time_data | string | Compare data |
StrBody's structure
Attributes | type | illustrate |
---|---|---|
ref_date | string | date |
cost_time_type | number | The meaning is the same as the cost_time_type |
cost_time | number | Time-consuming (milliseconds) |
{
"default_time_data": "{\"list\":[{\"ref_date\":\"20191029\",\"cost_time_type\":2,\"cost_time\":1533},{\"ref_date\":\"20191030\",\"cost_time_type\":2,\"cost_time\":1682}]}",
"compare_time_data": "",
"errcode": 0
}