当前位置:网站首页>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 .
边栏推荐
- Construction practice of bank intelligent analysis and decision-making platform
- Application of hidden list menu and window transformation in selenium
- How to handle the small program tabbar that does not support parameter transfer
- Vipshop work practice: Jason's deserialization application
- "One week to solve the model electricity" - negative feedback
- Upgrade phpcms applet plug-in API interface to 4.3 (add batch acquisition interface, search interface, etc.)
- Unity connects to Turing robot
- Collection object replication
- Super data processing operator helps you finish data processing quickly
- 编辑类型信息
猜你喜欢
![Li Kou 399 [division evaluation] [joint query]](/img/25/ea7d526c0628f11277141f51d4ccae.png)
Li Kou 399 [division evaluation] [joint query]

Behavior tree file description

Badge series 5: use of codecov

Pycharm occasionally encounters low disk space

Merrill Lynch data technology expert team | building a cloud native product system based on containers

Construction practice of bank intelligent analysis and decision-making platform

Nacos registry structure and the principle of massive service registration and concurrent read-write source code analysis

51单片机ROM和RAM

What is optimistic lock and what is pessimistic lock

Edit type information
随机推荐
Self taught machine learning series - 1 basic framework of machine learning
php提取txt文本存储json数据中的域名
Principle and application of single chip microcomputer -- Overview
Li Kou 399 [division evaluation] [joint query]
Basic concept and advanced level of behavior tree
Runtimeerror: object has no attribute NMS error record when using detectron2
Common circuit design
Unity connects to Turing robot
Classified catalogue of high quality sci-tech periodicals in the field of computing
Self taught programming series - 2 file path and text reading and writing
How to solve the sample imbalance problem in machine learning?
[open source] use phenocv weedcam for more intelligent and accurate weed management
thinkphp5使用composer安装插件提示php版本过高
"One week's solution to analog electricity" - power circuit
Detectron2 draw confusion matrix, PR curve and confidence curve
行为树XML文件 热加载
There is a strong demand for enterprise level data integration services. How to find a breakthrough for optimization?
《一周搞定模电》-光耦等元器件
Upgrade phpcms applet plug-in API interface to 4.3 (add batch acquisition interface, search interface, etc.)
"One week's work on digital power" -- encoder and decoder