当前位置:网站首页>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
边栏推荐
- Tidb v6.0.0 (DMR): initial test of cache table - tidb Book rush
- swagger使用
- Introduction to MySQL foundation power node [Lao Du] class assignment
- Redis design and Implementation (VI) | cluster (sharding)
- Gilbert Strang's course notes on linear algebra - Lesson 4
- C# ListBox如何获取选中的内容(搜了很多无效的文章)
- 2021-04-29
- Redis设计与实现(一)| 数据结构 & 对象
- C accesses mongodb and performs CRUD operations
- 证券开户的优惠怎样才能得到?在线开户安全?
猜你喜欢

VIM from dislike to dependence (21) -- cross file search

Pytorch BERT

【NVMe2.0b 14-1】Abort、Asynchronous Event Request、Capacity Management command

TiDB v6.0.0 (DMR) :缓存表初试丨TiDB Book Rush

C accesses mongodb and performs CRUD operations

Circuit analysis of current probe

A troubleshooting of CPU bottom falling

TiDB 6.0:让 TSO 更高效丨TiDB Book Rush

Self made GIF dynamic graph -gifcam

Wikimedia Foundation announces the first customers of its new commercial product "Wikimedia enterprise"
随机推荐
Deploy the cow like customer network project on the ECS
Flink SQL custom connector
Redis设计与实现(七)| 发布 & 订阅
2021-02-22
Wikimedia Foundation announces the first customers of its new commercial product "Wikimedia enterprise"
el-input 限制只能输数字
Gilbert Strang's course notes on linear algebra - Lesson 3
2021-05-17
Conversion between map, string and JSON
【NVMe2.0b 14-1】Abort、Asynchronous Event Request、Capacity Management command
Gilbert Strang's course notes on linear algebra - Lesson 2
MIME type Encyclopedia
Redis设计与实现(四)| 主从复制
基于Svelte3.x桌面端UI组件库Svelte UI
Qt通过Url下载文件
Vite project require syntax compatibility problem solving require is not defined
c#获取当前的时间戳
C#訪問SQL Server數據庫兩種方式的比較(SqlDataReader vs SqlDataAdapter)
Unity 基础光照模型
Build a docker image of Henkel database from 0