当前位置:网站首页>Use Huawei performance management service to configure the sampling rate on demand
Use Huawei performance management service to configure the sampling rate on demand
2022-07-02 11:00:00 【Huawei Developer Forum】
Android Huawei is used in the application AppGallery Connect Performance management services provided , Used for monitoring Android App Performance data for , Including commissioning APM When , From the log , Performance management SDK in , There's a lot of CPUMemoryEvent Events . For those who have not integrated performance management services, please refer to file coordination Github Demo Try to access .

from logccat According to the reported events , The frequency of reporting is still very high , Worry that the frequency of acquisition is too high , Will occupy the mobile phone CPU Resources for , The equipment and application are stuck . So we are studying how to configure performance management SDK Sampling rate .
The following steps and related screenshots are used to configure the sampling rate of Huawei performance management .
1、 Official document description :
First, check the Huawei documents , Documentation for configuring the sampling rate , Is in “ Add custom monitoring configuration ” Inside , It's hidden deep , Link address Click here to .
It mainly involves three parts , Set the session sampling rate 、 The front desk CPU Acquisition frequency 、 Memory acquisition frequency of the foreground .

2、 Configuration steps
1、 Configure the session sampling rate
First, let's introduce the conversation : Every time a user uses APP When , It's a conversation . Like you Application startup or App Switch to the foreground to start , To exit the application or switch to the background , It's a conversation
The session sampling rate refers to the probability of a session collection , The default is 1%. The higher the sampling rate , It will improve the probability of restoring the device information and user interaction track when the problem occurs ,
The configuration is as follows : Open the app's Manifest file , stay <application> The configuration inside the label is as follows data:
<meta-data
android:name="sessions_sampling_percentage"
android:value="1.0" />
The number represents the percentage .
2、 Configure the application in the foreground CPU Acquisition frequency
The meaning of the name is easy to understand , Configuration App At the front desk CPU Sampling rate .
Open the app's Manifest file , stay <application> The configuration inside the label is as follows data:
<meta-data
android:name="collect_cpu_frequency_fg_ms"
android:value="100" />
The numerical unit is ms, The configuration above is 100ms, each 100ms Take a sample .
3、 Configure the memory acquisition frequency of the application in the foreground
Configuration App Backstage CPU Sampling rate , Generally, the configuration is a little lower , Prevent occupation CPU resources .
<meta-data
android:name="collect_memory_frequency_fg_ms"
android:value="200" />
The unit of numbers is also ms, For example, I wrote above , It's every 200ms Take a sample .
For more details , Please see the :
Huawei official website :
https://developer.huawei.com/consumer/cn/forum/topic/0201640794525030131?fid=0101271690375130218?ha_source=zzh
边栏推荐
- 二叉树专题--【深基16.例7】普通二叉树(简化版)(multiset 求前驱 后继 哨兵法)
- [TS] 1368 seconds understand typescript generic tool types!
- 二叉树专题--洛谷 P1229 遍历问题(乘法原理 已知前、后序遍历求中序遍历个数)
- PCL之滤波
- 【快应用】Win7系统使用华为IDE无法运行和调试项目
- 【深入浅出玩转FPGA学习3-----基本语法】
- JSP webshell free -- webshell free
- The most detailed MySQL installation tutorial
- 【TS】1368- 秒懂 TypeScript 泛型工具类型!
- 使用华为性能管理服务,按需配置采样率
猜你喜欢

JSP webshell free -- webshell free

js数组常用方法

使用华为性能管理服务,按需配置采样率

实验电镜距离测量之Matlab处理

Hdu1234 door opener and door closer (water question)

Special topic of binary tree -- acwing 3540 Binary search tree building (use the board to build a binary search tree and output the pre -, middle -, and post sequence traversal)

MongoDB 学习整理(条件操作符,$type 操作符,limit()方法,skip() 方法 和 sort() 方法)

OpenMLDB Meetup No.4 会议纪要

从.bag文件中读取并保存.jpg图片和.pcd点云

Overview of integrated learning
随机推荐
Matlab processing of distance measurement of experimental electron microscope
In the face of uncertainty, the role of supply chain
V2X-Sim数据集(上海交大&纽约大学)
Special topic of binary tree -- acwing 3384 Binary tree traversal (known preorder traversal, while building a tree, while outputting middle order traversal)
Jsp webshell Free from killing - The Foundation of JSP
Point cloud projection picture
QT学习日记7——QMainWindow
MySQL lethal serial question 4 -- are you familiar with MySQL logs?
Static variables in static function
The URL in the RTSP setup header of the axis device cannot take a parameter
HDU1236 排名(结构体排序)
二叉树专题--洛谷 P3884 [JLOI2009]二叉树问题(dfs求二叉树深度 bfs求二叉树宽度 dijkstra求最短路)
[TS] 1368 seconds understand typescript generic tool types!
Open the encrypted SQLite method with sqlcipher
JSP webshell free -- webshell free
PCL之K-d树与八叉树
软件产品管理系统有哪些?12个最佳产品管理工具盘点
PCL point cloud to depth image
4. Random variables
力扣(LeetCode)182. 查找重复的电子邮箱(2022.07.01)