当前位置:网站首页>Optimization of power assisted performance of QPM suspended window
Optimization of power assisted performance of QPM suspended window
2022-06-26 09:26:00 【gdky005】
QPM Open source address :https://github.com/ZhuoKeTeam/QPM
Let's try to make some floating window functions that can be visualized , It can display some basic performance index data .
start-up App Then you can see some data , Unresolved root The mobile phone can't get data .
Package name
One apk There will be a fixed package name , But in some special situations , Multiple package names will be displayed , for example : Test package , Official package , Variant package , Push test package, etc , to QPM Show the package name of the current application , It is convenient for us to locate the problem at some time . for instance : We have been testing the push package before , Sometimes you need to switch to the official package , Switch between the two packages RD,ST Environmental Science , Finally, I don't remember what bag I used , Can only uninstall , reinstall .QPM The floating window of can directly display the package name of the current application , You can see it at a glance , In fact, the current process can also be + The thread number is printed , It is convenient for students to analyze problems .
At present Activity Name
Just imagine , Did 5 Years of the project , Let the newcomer take over ? Or a colleague leaves , Drop a pile of holes , I need you to fill the hole . After sorting out the process according to the code , It may not be able to take over immediately , If you look for Activity, One word ———— tired !
If you can directly display the current interface Activity name , Is it easier ?
CPU and Memory
Why is the interface so blocked , Quickly optimize . You may wonder where to start ? First render from the interface , Or from a business perspective ? The key is that we need to know what scenarios on the page will cause problems , It is easy to judge if there is an intuitive indicator . When CPU arrive 200% When , Memory explosion , There must be a problem , You can use performance tools to analyze this page in detail . Generally, first look at the interface CPU and Whether the memory is abnormal , Combine with the business logic to obtain the relevant data in advance or delay , Reduce concurrent access at the same time , So as to reduce the jamming of the main interface .
Number of threads
What the hell is this ? I still remember that the boss once said to reuse threads , Don't do it alone . If you find that 200 Multiple threads , Then you have to consider whether you need a thread pool . It can be handled according to the existing logic , Not absolute .
Activity Stack
Remember just learning Activity At that time ,Activity Of Four kinds of LaunchMode, Here you can record a stack of Activity The order of . It is convenient for you to intuitively understand the situation in the stack .
Traffic
We App How much traffic did your request use ? May be in 3G/4G More concerns , Although most of them are now WIFI, But our users will use under certain circumstances 3G/4G, So I still have to pay attention .
How about the network ? For example, I use Wifi, The Internet speed is poor in some corners , There is not even traffic data , We all hope to know .
At some point , The page is blank ? Why is there no data , You can try to see the download speed .
Especially for some small videos that have been invited more and more , You may be concerned about how much traffic is used .
Screen Recording
be based on Android 5.0 Of API, Record the entire screen , It is convenient for you to repeat some questions about operation records .
monitor H5 page
It needs to be matched with the corresponding settings , We can do that WebView Asynchronously detect any web page in , For example, get the current page address , Homepage white screen loading time , And the request time for each resource , And request resource addresses . Very easy to .
Five customized external styles
A unique identifier for , It means a item, If you want to add multiple , The unique identifier can be set to different .
- Large file box style
QPMManager.getInstance().showBigText(flag, bigText);
The first parameter flag It's the only sign , the second bigText Is to customize all text data displayed in the floating window .
- Key value pair text style
QPMManager.getInstance().showKeyValue(flag, key, value);
The first parameter flag It's the only sign , the second key Is displayed in the custom floating window key value , The third is In the suspended window value value .
- Key graph style
QPMManager.getInstance().showKeyPic(flag, key, picRes);
The first parameter flag It's the only sign , the second key Is displayed in the custom floating window key value , The third is In the suspended window pic Res Resource values in .
- Graph value style
QPMManager.getInstance().showPicValue(flag, picId, value);
The first parameter flag It's the only sign , the second key Is displayed in the custom floating window key value , The third is In the suspended window pic Res Resource values in ( You can put it in your Lord App in ).
- Custom style
QPMManager.getInstance().showCustom(flag,QPMTemplateCustomRenderer);
The first parameter flag It's the only sign , the second QPMTemplateCustomRenderer It is to customize the layout you want to add in the floating window , You can write a class , Inherited from QPMTemplateCustomRenderer, Implement the methods inside , The corresponding contents can be displayed on the floating window .
边栏推荐
- 《一周搞定模电》—55定时器
- Merrill Lynch data technology expert team | application of recommendation of relevant contents in group system data retrieval
- Adding confidence threshold for demo visualization in detectron2
- How to correctly open the USB debugging and complete log functions of Huawei mobile phones?
- Bug encountered in training detectron2: the test set cannot be evaluated during training
- 简析ROS计算图级
- How to solve the problem that NVIDIA model cannot be viewed by inputting NVIDIA SMI and quickly view NVIDIA model information of computer graphics card
- Unity webgl publishing cannot run problem
- Fix the problem that the rich text component of the applet does not support the properties of video cover, autoplay, controls, etc
- 《單片機原理及應用》——概述
猜你喜欢

Yolov5 results Txt visualization

How to view the data mini map quickly and conveniently after importing data in origin

Badge series 8: generate a personalized Badge

Talk about the development of type-C interface

计算领域高质量科技期刊分级目录

kubernetes集群部署(v1.23.5)

《一周搞定模电》—功率放大器

Common circuit design

Kubernetes cluster deployment (v1.23.5)

【C】 Frog jumping steps and Hanoi Tower problem (recursion)
随机推荐
Tutorial 1:hello behavioc
Construction practice of bank intelligent analysis and decision-making platform
Badge collection 6:api\_ Use of level
Statistics of various target quantities of annotations (XML annotation format)
Li Kou 399 [division evaluation] [joint query]
Adding confidence threshold for demo visualization in detectron2
Thinkphp5 manual error reporting
Runtimeerror: object has no attribute NMS error record when using detectron2
Detectron2 draw confusion matrix, PR curve and confidence curve
Nacos registry structure and the principle of massive service registration and concurrent read-write source code analysis
挖财打新债安全吗
The most complete and simple nanny tutorial: deep learning environment configuration anaconda+pychart+cuda+cudnn+tensorflow+pytorch
thinkphp5手动报错
【CVPR 2021】DatasetGAN: Efficient Labeled Data Factory with Minimal Human Effort
计算领域高质量科技期刊分级目录
A Style-Based Generator Architecture for Generative Adversarial Networks
Behavior tree file description
《一周搞定数电》——组合逻辑电路
PHP does not allow images to be uploaded together with data (no longer uploading images before uploading data)
Jetson TX2 installing the SciPy Library