当前位置:网站首页>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
边栏推荐
- Is the account above changtou school safe?
- Oracle 笔记
- 计算序列之和
- 2022-06-17
- UVM learning - object attribute of UVM phase
- VSCode工具使用
- 【深入浅出玩转FPGA学习4----漫谈状态机设计】
- Special topic of binary tree -- acwing 18 Rebuild the binary tree (construct the binary tree by traversing the front and middle order)
- UVM - configuration mechanism
- php中self和static在方法中的区别
猜你喜欢
【快应用】text组件里的文字很多,旁边的div样式会被拉伸如何解决
集成学习概览
618 what is the secret of dominating the list again? Nike's latest financial report gives the answer
二叉树专题--洛谷 P3884 [JLOI2009]二叉树问题(dfs求二叉树深度 bfs求二叉树宽度 dijkstra求最短路)
华为应用市场应用统计数据问题大揭秘
V2X-Sim数据集(上海交大&纽约大学)
Jsp webshell Free from killing - The Foundation of JSP
LeetCode+ 76 - 80 暴搜专题
《实习报告》Skywalking分布式链路追踪?
首份中国企业敏捷实践白皮书发布| 附完整下载
随机推荐
从.bag文件中读取并保存.jpg图片和.pcd点云
二叉树专题--AcWing 47. 二叉树中和为某一值的路径(前序遍历)
Special topic of binary tree -- acwing 1589 Building binary search tree
Jsp webshell Free from killing - The Foundation of JSP
Win11 arm系统配置.net core环境变量
V2X-Sim数据集(上海交大&纽约大学)
Use of vscode tool
LabVIEW为什么浮点数会丢失精度
华为AppLinking中统一链接的创建和使用
【AGC】如何解决事件分析数据本地和AGC面板中显示不一致的问题?
PCL extracts a subset from a point cloud
洛谷 P5536 【XR-3】核心城市(贪心 + 树形 dp 寻找树的中心)
JS settimeout() and interview questions
Convert yv12 to rgb565 image conversion, with YUV to RGB test
PCL point cloud to depth image
Special topic of binary tree -- acwing 18 Rebuild the binary tree (construct the binary tree by traversing the front and middle order)
Special topic of binary tree -- acwing 47 Path with a certain value in binary tree (preorder traversal)
洛谷 P3398 仓鼠找 sugar(树上倍增 lca 判断树中两条路径是否相交 结论)
Special topic of binary tree -- acwing 3384 Binary tree traversal (known preorder traversal, while building a tree, while outputting middle order traversal)
Mysql database remote access permission settings