当前位置:网站首页>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-06-30 08:44: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
边栏推荐
- 小心transmittable-thread-local的这个坑
- Mmcv expanding CUDA operator beginner level chapter
- 酒精测试仪方案:酒精测试仪是根据什么原理测酒精溶度?
- Flink Exception -- No ExecutorFactory found to execute the application
- 【NVMe2.0b 14】NVMe Admin Command Set
- This point in JS
- Pytorch BERT
- 使用华为性能管理服务,按需配置采样率
- Comparison of two ways for C to access SQL Server database (SqlDataReader vs SqlDataAdapter)
- Bind threads to run on a specific CPU logical kernel
猜你喜欢
Redis设计与实现(四)| 主从复制
A troubleshooting of CPU bottom falling
Redis design and Implementation (V) | sentinel sentry
Bind threads to run on a specific CPU logical kernel
Detailed explanation of pytoch's scatter function
Swagger use
Wikimedia Foundation announces the first customers of its new commercial product "Wikimedia enterprise"
Deploy the cow like customer network project on the ECS
电流探头电路分析
swagger使用
随机推荐
A troubleshooting of CPU bottom falling
[untitled]
Based on svelte3 X desktop UI component library svelte UI
[untitled]
Introduction to MySQL basics day3 power node [Lao Du] class notes
挖财开户安全吗?怎么有人说不靠谱。
el-input 限制只能输数字
【NVMe2.0b 14-1】Abort、Asynchronous Event Request、Capacity Management command
Is the reverse repurchase of treasury bonds absolutely safe? How to open an account online
Be careful of this hole in transmittable thread local
在浏览器输入url到页面展示出来
Redis design and Implementation (I) | data structure & object
2021-04-29
一次cpu 跌底排查
Gilbert Strang's course notes on linear algebra - Lesson 3
Emoji icons supported by markdown
电流探头电路分析
C#访问SQL Server数据库两种方式的比较(SqlDataReader vs SqlDataAdapter)
codeforces每日5题(均1700)-第三天
Redis设计与实现(五)| Sentinel哨兵