Skip to main content

CPU Analysis

The CPU analysis function can monitor the CPU usage of online applications in real time. By providing detailed CPU indicators and CPU exception numbers, it helps developers identify application performance bottlenecks and optimize application CPU usage, reduce resource consumption in the foreground or background of applications, improve application response speed and fluency, and thus improve user experience, extend device battery life, and reduce heat generation.

Indicator Analysis

Indicator Description

MetricDescription
CPU usageRefers to the ratio of the CPU processing time to the total time of a certain time interval.
Calculation formula: Application process CPU duration / Device CPU core frequency duration * 100%
CPU usage rateThe ratio of the CPU time consumed by the application process to the collection time in a specific time interval (1 minute). For multi-core systems, the maximum usage rate is equal to the number of CPU cores.
Calculation formula: Application process CPU duration / Collection time

Filter Conditions

You can filter data by dimensions such as application version, device, operating system, channel, business scenario, etc.

Trend Analysis

Shows trend charts of CPU usage, CPU usage rate, and sample size under the filtering conditions; the trend chart displays the average value by default, and you can filter out the CPU usage and CPU usage rate trend charts of any percentile value in "25, 50, 75, 90, 99" on the right; the distribution chart shows the indicator data filtered by dimensions such as application version, device, operating system, channel, business scenario, etc.; it supports exporting data in the trend distribution chart.

**Trend Charts **

Distribution Charts

Thread CPU usage

Shows the CPU usage of each thread and supports exporting the CPU usage data of each thread.

Abnormal analysis

CPU exception: The application continues to have high CPU consumption in the foreground or background for a period of time. Long-term high CPU consumption of applications will lead to faster power consumption, device heating, etc.

Indicator Description

IndicatorDescription
Number of exceptionsTotal number of CPU exceptions triggered; CPU usage rate exceeding the threshold within 30 seconds is recorded as a CPU exception
Exception rateNumber of CPU exceptions / Total number of startups
Number of affected devicesNumber of devices with CPU exceptions
Percentage of affected devicesNumber of devices with CPU exceptions / Total number of active devices

Filter conditions

You can filter data by application version, device, operating system, channel, business scenario and other dimensions.

Trend analysis

Shows the trend chart of abnormal indicators "abnormal number, abnormal rate, number of affected devices, and proportion of affected devices" under the filtering conditions; supports exporting data in the trend chart.

Exception list

Displays detailed data of CPU exceptions, and the list supports export; exception problems are classified by high-frequency call stacks and thread names; you can upload DSYM/mapping files to symbolize/deobfuscate the CPU exception stack.

You can filter the following dimensions to filter data:

Filter dimensions: exception stack, exception ID, userID, handler, label, exception type, exception status

Exception details

Display the details of each exception problem and support exception sharing.

Overview

Single sample call tree:Display the details of each CPU exception problem "Exception device details and stack details"。

Device details:UserID, occurrence time, session duration, device ID, application version, device model, operating system, SessionID, region, operator, access method, page name, business scenario, CPU model, CPU instruction set, device memory, remaining memory, memory occupied by applications, and remaining storage space.

Stack Details

  • Flame Graph:Aggregate the collected thread stack information into a flame graph display; support node search and user/system node filtering.

  • Thread Call Tree:Aggregate the collected thread stack information into a call tree display. The "CPU ratio" on the right is the ratio of the thread CPU usage to the application CPU usage. The larger the value, the more CPU the thread occupies. After expanding each thread tree, you can view the specific function call to analyze the abnormal problem.

Summary Call Tree:Aggregate all abnormal single-sample CPU abnormal data into flame graphs and call trees for display.

  • Flame Graph

  • Thread Call Tree

CPU abnormality threshold setting

Click "Application List" - "Settings" - "Resource Monitoring" to enter the CPU setting page. You can change the CPU abnormality threshold according to actual needs.

CPU Settings

  • CPU usage rate threshold: If the CPU usage rate of the application process in the foreground exceeds the threshold, it is identified as abnormal; the default threshold is 3, the minimum value is 1, and the maximum value is 16.
  • Thread CPU usage rate threshold: If the CPU usage rate of the thread exceeds the threshold, it is identified as abnormal; the default threshold is 0.05, the minimum value is 0.01, and the maximum value is 1.