CN107832203B - Method for diagnosing rendering performance of mobile terminal - Google Patents
Method for diagnosing rendering performance of mobile terminal Download PDFInfo
- Publication number
- CN107832203B CN107832203B CN201711088715.7A CN201711088715A CN107832203B CN 107832203 B CN107832203 B CN 107832203B CN 201711088715 A CN201711088715 A CN 201711088715A CN 107832203 B CN107832203 B CN 107832203B
- Authority
- CN
- China
- Prior art keywords
- rendering
- control
- performance
- interface
- feature
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3476—Data logging
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3452—Performance evaluation by statistical analysis
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/24—Arrangements for testing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Signal Processing (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Probability & Statistics with Applications (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种移动终端渲染性能问题诊断方法,特别是面向应用开发者的针对终端应用程序的渲染性能定位方法。The invention relates to a method for diagnosing rendering performance problems of a mobile terminal, in particular to a rendering performance positioning method for terminal applications oriented to application developers.
背景技术Background technique
近年来,随着移动设备和移动应用程序数量的增长迅速,用户花在移动应用程序上的时间也不断增加。移动应用程序在一次用户操作后产生响应叫做一次交互,完成交互逻辑并绘制所有界面所需的时间叫做响应时间。一般一次用户交互所需时间在几秒内。由于移动应用程序的交互响应时间与终端用户的体验直接相关,因此近年来在学术界和工业界都引起了非常广泛的重视。国内外研究者在此方面开展了较为深入而广泛的研究,近年来已出现了许多针对交互响应时间的深入研究。In recent years, as the number of mobile devices and mobile applications has grown rapidly, so has the time users spend on mobile applications. A mobile application produces a response after a user action is called an interaction, and the time required to complete the interaction logic and draw all the interface is called the response time. Typically a user interaction takes a few seconds. Since the interaction response time of mobile applications is directly related to the end-user experience, it has attracted a lot of attention in both academia and industry in recent years. Domestic and foreign researchers have carried out in-depth and extensive research in this area. In recent years, there have been many in-depth studies on interaction response time.
过去的关于移动应用程序响应时间的研究主要将目光放在网络访问、IO请求等重量级操作上。例如,Applnsight利用二进制插桩技术跟踪用户操作在应用程序内的行为,然后通过分析关键执行路径得到导致性能问题的根本原因。由于存储的IO访问会导致较长时间的延迟(delay),因此有许多工作关注在测量和优化存储的IO访问时间。例如H.Kim等人通过分析移动设备的存储系统,发现存储系统的设计与移动应用程序的性能存在正相关的关系,并在此基础上提出了一系列的方案,用于解决存储IO导致的性能问题。但是,这些工作都没有涉及到移动应用程序响应过程中的界面绘制过程。在我们的发现中,对于时间较短的用户交互过程,界面绘制所需的时间占整个交互响应过程相当大的一部分此重。显然,定位并优化渲染过程中的性能问题也是提高移动应用程序的关键之一。Past research on mobile application response time has mainly focused on heavyweight operations such as network access and IO requests. For example, Applnsight uses binary instrumentation to track the behavior of user actions within the application, and then analyzes the critical execution path to get the root cause of performance problems. Since storage IO accesses cause long delays, a lot of work has focused on measuring and optimizing storage IO access times. For example, H. Kim et al. analyzed the storage system of mobile devices and found that there is a positive correlation between the design of the storage system and the performance of mobile applications, and based on this, they proposed a series of solutions to solve the problems caused by storage IO. performance issues. However, none of these works involve the interface drawing process during the mobile application's responsiveness. In our findings, for a short user interaction process, the time required for interface rendering accounts for a considerable part of the entire interaction response process. Obviously, locating and optimizing performance issues in the rendering process is also one of the keys to improving mobile applications.
发明内容SUMMARY OF THE INVENTION
本发明要克服现有技术的上述缺点,针对移动应用程度的用户交互过程中的渲染过程,提供一种定位和诊断渲染问题的方法。To overcome the above shortcomings of the prior art, the present invention provides a method for locating and diagnosing rendering problems for the rendering process in the user interaction process of the mobile application level.
为实现以上目的,本发明所采取的技术方案是:该移动终端性能诊断方法,包括以下步骤:In order to achieve the above purpose, the technical solution adopted by the present invention is: the mobile terminal performance diagnosis method, comprising the following steps:
1)修改Android的framework代码,使得在应用程序运行时能够获得每个控件的渲染相关信息。1) Modify the Android framework code so that the rendering-related information of each control can be obtained when the application is running.
2)在修改的Android平台上运行大量的应用程序,收集这些应用程序运行获得的渲染信息,并利用这些数据构造一个贝叶斯网络。2) Run a large number of applications on the modified Android platform, collect the rendering information obtained by running these applications, and use these data to construct a Bayesian network.
3)利用构造的贝叶斯网络,对特定应用程序的特定渲染界面的每个控件进行计算,得到一个该控件对整个界面渲染时间的贡献值渲染性能系数(RCS)。通过对所有控件按RCS进行排序,得到对特定应用程序的特定界面渲染性能影响最大的控件。开发者可以在此基础上对该应用程序进行深入的优化。3) Using the constructed Bayesian network, calculate each control of a specific rendering interface of a specific application, and obtain a rendering performance coefficient (RCS) of the contribution of the control to the rendering time of the entire interface. By sorting all controls by RCS, the controls that have the greatest impact on the rendering performance of a specific interface for a specific application are obtained. Developers can further optimize the application on this basis.
优选地,步骤1)中所述的对Android Framework修改获得到的渲染相关数据包括:Preferably, the rendering-related data obtained by modifying the Android Framework described in step 1) includes:
1.1每个控件的相关数据。此处的控件是Android平台上界面控件的基本元素,所有的界面都由多个控件构成。这些数据包括控件的唯一id,控件的大小,控件的位置。1.1 Relevant data of each control. The controls here are the basic elements of interface controls on the Android platform, and all interfaces are composed of multiple controls. This data includes the unique id of the control, the size of the control, and the position of the control.
1.2控件的层次关系。Android平台的界面是树状结构,控件之间存在层次关系。通过获得父控件的标识符id可以重新构造出当前界面所有控件的层次关系。1.2 The hierarchical relationship of controls. The interface of the Android platform is a tree structure, and there is a hierarchical relationship between the controls. By obtaining the identifier id of the parent control, the hierarchical relationship of all controls in the current interface can be reconstructed.
1.3渲染的操作和时序。包括测量measure、布局layout、绘制draw三个操作的耗时。1.3 Rendering operations and timing. Including the time-consuming of three operations: measure, layout, and draw.
1.4用户操作的相关数据。包括点击、滑动等操作的开始时间,以及系统的FPS帧率。1.4 Data related to user operations. Including the start time of operations such as clicking and sliding, and the FPS frame rate of the system.
优选地,步骤2)中所述的贝叶斯网络的构造方法:Preferably, the construction method of the Bayesian network described in step 2):
2.1贝叶斯网络是一个有向无环图,该图的节点包括两种类型:渲染特征rendering features节点以及性能指标performance metric节点。渲染特征我们用f1到fN表示,即N个渲染特征;性能指标我们用p1和p2表示,即两个性能指标。2.1 The Bayesian network is a directed acyclic graph, and the nodes of the graph include two types: rendering features rendering features node and performance metric node. The rendering features are represented by f 1 to f N , that is, N rendering features; the performance indicators are represented by p 1 and p 2 , which are two performance indicators.
2.2我们用corr(fi,fj)表示特征i与特征j的相关系数,用corr(fi,pj)表示特征i与性能指标j的相关系数,这在贝叶斯网络中表现为节点间的边的权重。2.2 We use corr(fi , f j ) to represent the correlation coefficient between feature i and feature j , and use corr(fi , p j ) to represent the correlation coefficient between feature i and performance index j , which is expressed in the Bayesian network as Weights of edges between nodes.
2.3得到贝叶斯网络后,我们进一步计算渲染特征i对性能指标j的贡献值sig(fi,pj)。2.3 After obtaining the Bayesian network, we further calculate the contribution of the rendering feature i to the performance index j, sig(f i , p j ).
优选地,步骤3)中所述的渲染性能系数RCS的计算方法,具体是:Preferably, the calculation method of the rendering performance coefficient RCS described in step 3) is specifically:
3.1我们用con(vi,fj)表示一个控件对特征j的贡献值。对于不同的特征有不同的计算方法。3.1 We use con(vi, fj ) to denote the contribution of a control to feature j . There are different calculation methods for different features.
3.2基于2.3中的sig(fi,pj)和3.1中的con(vi,fj),我们提出了计算特定控件的渲染性能系数(RCS)值RCS(vi)的计算方法:3.2 Based on sig(f i , p j ) in 2.3 and con(vi , f j ) in 3.1, we propose a calculation method to calculate the rendering performance coefficient (RCS) value RCS(vi ) for a specific control:
3.3利用步骤3.2中得到的渲染性能系数RCS,我们对特定界面的所有控件元素进行计算,并按照渲染性能系数RCS排序,得分较高的即对界面的渲染性能影响较大,应该被开发者重点注意和优化。3.3 Using the rendering performance coefficient RCS obtained in step 3.2, we calculate all the control elements of a specific interface and sort them according to the rendering performance coefficient RCS. The higher score has a greater impact on the rendering performance of the interface, and should be the focus of developers. Attention and optimization.
与现有技术相此,本发明的有益效果是:该方法通过大量的数据训练贝叶斯网络模型,将控件的渲染数据与最终界面的渲染性能对应起来;开发者可以利用该方法精确地定位到引起界面渲染性能下降的UI组件,提高开发和问题定位的效率。Compared with the prior art, the beneficial effects of the present invention are: the method trains a Bayesian network model through a large amount of data, and corresponds the rendering data of the control with the rendering performance of the final interface; developers can use this method to accurately locate To the UI components that cause the performance of interface rendering to decrease, improve the efficiency of development and problem location.
附图说明Description of drawings
图1是本发明的方法框架图Fig. 1 is the method frame diagram of the present invention
具体实施方式Detailed ways
下面结合附图对本发明的一种移动终端性能诊断方法的实施进行详细说明,其步骤如下:The implementation of a mobile terminal performance diagnosis method of the present invention will be described in detail below with reference to the accompanying drawings, and the steps are as follows:
1.对Android Framework修改的方法以及获得到的渲染相关数据如下:1. The method of modifying the Android Framework and the rendering-related data obtained are as follows:
1.1.对Android Framework的修改是指对源代码View.java和Choreographer.java文件进行修改,在相关函数处插入代码输出时间与相关的数据。修改过的Framework进行编译后,生成framework.jar文件,通过adb工具上传到Android设备上,并替换掉原有的framework.jar。重启设备,即完成了Android平台的修改。1.1. Modifying the Android Framework refers to modifying the source code View.java and Choreographer.java files, and inserting the code output time and related data at the relevant functions. After the modified Framework is compiled, the framework.jar file is generated, uploaded to the Android device through the adb tool, and the original framework.jar is replaced. Restart the device to complete the modification of the Android platform.
1.2.在修改过的Android平台上运行,可以获得的数据包括以下类型:1.2. Running on the modified Android platform, the data that can be obtained include the following types:
1.2.1.每个控件的相关数据。此处的控件是Android平台上界面控件的基本元素,所有的界面都由多个控件构成。这些数据包括控件的唯一id,控件的大小,控件的位置。1.2.1. Data related to each control. The controls here are the basic elements of interface controls on the Android platform, and all interfaces are composed of multiple controls. This data includes the unique id of the control, the size of the control, and the position of the control.
1.2.2.控件的层次关系。Android平台的界面是树状结构,控件之间存在层次关系。通过获得父控件的标识符id可以重新构造出当前界面所有控件的层次关系。1.2.2. The hierarchical relationship of controls. The interface of the Android platform is a tree structure, and there is a hierarchical relationship between the controls. By obtaining the identifier id of the parent control, the hierarchical relationship of all controls in the current interface can be reconstructed.
1.2.3.渲染的操作和时序。包括measure、layout、draw三个操作的耗时。1.2.3. Rendering operations and timing. Including the time-consuming of measure, layout, and draw operations.
1.2.4.用户操作的相关数据。包括点击、滑动等操作的开始时间,以及系统的FPS帧率。1.2.4. Data related to user operations. Including the start time of operations such as clicking and sliding, and the FPS frame rate of the system.
2.步骤2)中所述的贝叶斯网络的构造方法如下:2. The construction method of the Bayesian network described in step 2) is as follows:
2.1.贝叶斯网络是一个有向无环图,该图的节点包括两种类型:渲染特征rendering features节点以及性能指标performance metric节点。渲染特征我们用f1到fN表示,即N个渲染特征;性能指标我们用p1和p2表示,即两个性能指标。2.1. Bayesian network is a directed acyclic graph, and the nodes of the graph include two types: rendering features rendering features node and performance metric node. The rendering features are represented by f 1 to f N , that is, N rendering features; the performance indicators are represented by p 1 and p 2 , which are two performance indicators.
2.1.1.渲染特征是由步骤1.2中获得的界面控件渲染数据经过处理得来的。具体的渲染特征如表格1所示。2.1.1. The rendering feature is obtained by processing the interface control rendering data obtained in step 1.2. The specific rendering features are shown in Table 1.
表格1Table 1
2.2.我们用corr(fi,fj)表示特征i与特征j的相关系数,用corr(fi,pj)表示特征i与性能指标j的相关系数,这在贝叶斯网络中表现为节点间的边的权重。2.2. We use corr(fi , f j ) to represent the correlation coefficient between feature i and feature j , and use corr(fi , p j ) to represent the correlation coefficient between feature i and performance index j , which is expressed in the Bayesian network is the weight of the edge between nodes.
2.3.得到贝叶斯网络后,我们进一步计算渲染特征i对性能指标j的贡献值sig(fi,pj)。计算方法为将该节点i到渲染性能节点j路径上所有的边的权重加起来,即得到该贡献值。2.3. After obtaining the Bayesian network, we further calculate the contribution of the rendering feature i to the performance index j, sig(f i , p j ). The calculation method is to add up the weights of all the edges on the path from the node i to the rendering performance node j, that is, to obtain the contribution value.
3.步骤3)中所述的渲染性能系数RCS的计算方法3. Calculation method of rendering performance coefficient RCS described in step 3)
3.1.我们用con(vi,fj)表示一个控件对特征j的贡献值。对于不同的特征有不同的计算方法。例如,对于“空点数量”这个特征,所有的控件的是1,而对于“绘制操作的最大执行时间”这个特征,绘制时间达到最大绘制时间的控件的贡献值为1/m,其中m为绘制时间达到最大绘制时间的控件数;而绘制时间小于最大绘制时间的控件的贡献值为0。3.1. We use con(vi, fj ) to denote the contribution of a control to feature j . There are different calculation methods for different features. For example, for the feature "number of empty points", all controls have a value of 1, and for the feature "maximum execution time of drawing operations", the contribution value of the control whose drawing time reaches the maximum drawing time is 1/m, where m is The number of controls whose draw time reaches the maximum draw time; the contribution of controls whose draw time is less than the maximum draw time is 0.
3.2.基于2.3中的渲染特征贡献值sig(fi,pj)和3.1中的控件特征贡献值con(vi,fj),我们提出了计算特定控件的渲染性能系数RCS值RCS(vi)的计算方法:3.2. Based on the rendering feature contribution values sig(f i , p j ) in 2.3 and the control feature contribution values con(vi , f j ) in 3.1, we propose to calculate the rendering performance coefficient RCS value of a specific control RCS(v i ) calculation method:
3.3.利用32.中得到的渲染性能系数RCS,我们对特定界面的所有控件元素进行计算,并按照渲染性能系数RCS排序,得分较高的即对界面的渲染性能影响较大,应该被开发者重点注意和优化。3.3. Using the rendering performance coefficient RCS obtained in 32., we calculate all the control elements of a specific interface and sort them according to the rendering performance coefficient RCS. The higher score has a greater impact on the rendering performance of the interface, and should be used by developers. Focus on attention and optimization.
本说明书实施例所述的内容仅仅是对发明构思的实现形式的列举,本发明的保护范围的不应当被视为仅限于实施例所陈述的具体形式,本发明的保护范围也及于本领域技术人员根据本发明构思所能够想到的等同技术手段。The content described in the embodiments of the present specification is only an enumeration of the realization forms of the inventive concept, and the protection scope of the present invention should not be regarded as limited to the specific forms stated in the embodiments, and the protection scope of the present invention also extends to the field Equivalent technical means that can be conceived by a skilled person according to the inventive concept.
Claims (1)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711088715.7A CN107832203B (en) | 2017-11-08 | 2017-11-08 | Method for diagnosing rendering performance of mobile terminal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711088715.7A CN107832203B (en) | 2017-11-08 | 2017-11-08 | Method for diagnosing rendering performance of mobile terminal |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN107832203A CN107832203A (en) | 2018-03-23 |
| CN107832203B true CN107832203B (en) | 2020-11-13 |
Family
ID=61654675
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201711088715.7A Active CN107832203B (en) | 2017-11-08 | 2017-11-08 | Method for diagnosing rendering performance of mobile terminal |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107832203B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112287255B (en) * | 2020-07-13 | 2024-02-09 | 上海柯林布瑞信息技术有限公司 | Page construction method and device, computing equipment and computer readable storage medium |
| CN114610300A (en) * | 2022-02-08 | 2022-06-10 | 武汉光庭信息技术股份有限公司 | System-level APP UI design method and device based on Android frame |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106775710A (en) * | 2016-12-14 | 2017-05-31 | 杭州长亮金融信息服务有限公司 | Cross-platform interface alternation development system and its operation method based on smart machine |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2012044546A2 (en) * | 2010-10-01 | 2012-04-05 | Imerj, Llc | Auto-waking of a suspended os in a dockable system |
-
2017
- 2017-11-08 CN CN201711088715.7A patent/CN107832203B/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106775710A (en) * | 2016-12-14 | 2017-05-31 | 杭州长亮金融信息服务有限公司 | Cross-platform interface alternation development system and its operation method based on smart machine |
Non-Patent Citations (1)
| Title |
|---|
| 安卓应用软件测试信息智能监测系统设计;蔡娟 等;《现代电子技术》;20170715;第40卷(第14期);58-63 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107832203A (en) | 2018-03-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108664269B (en) | A deep learning-based method for detecting code smell of feature attachment | |
| CN102831056B (en) | Regression testing sample generating method based on modification impact analysis | |
| CN105608199B (en) | Extension method and device for standard questions in intelligent question-answering system | |
| CN106897833B (en) | New energy power distribution network reliability assessment method and device | |
| CN105224463B (en) | A kind of software defect Code location method based on crash stack data | |
| CN103064664A (en) | Hadoop parameter automatic optimization method and system based on performance pre-evaluation | |
| CN105468510A (en) | Method and system for evaluating and tracking software quality | |
| CN111506504B (en) | Software development process measurement-based software security defect prediction method and device | |
| CN105959372A (en) | Internet user data analysis method based on mobile application | |
| CN105320589B (en) | The automatic resolution system of test script and its implementation in cloud test environment | |
| CN106803799A (en) | A kind of performance test methods and device | |
| CN108021509B (en) | A Dynamic Sorting Method of Test Cases Based on Program Behavior Network Aggregation | |
| CN116107664A (en) | Low-cost high-dimensional multi-target software configuration parameter tuning method and system | |
| CN107832203B (en) | Method for diagnosing rendering performance of mobile terminal | |
| CN104794209A (en) | Chinese microblog sentiment classification method and system based on Markov logic network | |
| García Martín | Energy efficiency in machine learning: A position paper | |
| Han et al. | Benchmarking big data systems: State-of-the-art and future directions | |
| CN102289408A (en) | regression test case sequencing method based on error propagation network | |
| CN101609411B (en) | Embedded software power consumption BP neural network modeling method based on complexity | |
| CN109324949A (en) | A kind of Static Analysis Method of lua code execution performance | |
| CN104834634A (en) | Regression-based cost modeling method and device for predicting SQL statement performance | |
| CN103729297A (en) | Test case generation method based on hierarchic genetic algorithm | |
| CN103646061B (en) | Service-oriented demand analysis method | |
| CN103399918B (en) | A kind of method improving the searched rate in website | |
| CN111897719B (en) | Analysis Method of Program Change Impact Based on Code Text and Call Relationship |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |