Test method and apparatus
A test method and test device technology, applied in the computer field, can solve problems such as consuming manpower and material resources, and achieve the effect of improving performance test efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
no. 1 example
[0037] figure 2 Shows a flow chart of a test method, such as figure 2 As shown, the method of this embodiment is used to test an application program running in a terminal, and the method includes the following steps:
[0038] Step S101: Load a first timer at the function entry of the application program, where the first timer is used to obtain the first time of the terminal.
[0039] The function is a function in a programming language. These statements in the function procedure are used to accomplish some meaningful work-usually processing text, controlling input or calculating values. By introducing the function name and required parameters into the program code, the function can be executed (or called) in the program. It can be known that each function of the application program is implemented by functions of different applications.
[0040] In this embodiment, the first timer is used to test the additional unit of the function, and is used to obtain the real-time time when th...
no. 2 example
[0055] This embodiment provides a test method. This embodiment is similar to the first embodiment, except that: image 3 As shown, the method further includes after step S105:
[0056] Step S201: Load a counter corresponding to the function name according to the function name, where the counter is used to count the number of invocations of the function of the application program.
[0057] Further, the data of the counter is stored in the corresponding position of the function name in the log of the application program.
[0058] The counter is used to record the number of times the function is called. It can be known that if the function has been called, the counter has already been assigned. In an example, if the function is loaded for the first time, a counter of the function can be created in the log. For example, you can directly use Arabic numerals to store the counter value.
[0059] Step S202: Update the value of the counter.
[0060] Update the value of the counter, for exampl...
no. 3 example
[0064] This embodiment provides a test method. This embodiment is similar to the second embodiment, except that: Figure 4 As shown, after step S202, it further includes:
[0065] Step S301: Load a counter corresponding to the function name according to the function name, where the counter is used to count the number of invocations of the function of the application program.
[0066] In one example, the average call time is obtained by dividing the sum of each call time of the function by the value in the counter.
[0067] Step S302: Store the average calling time and the longest calling time of the function of the application program in correspondence with the function name.
[0068] In one embodiment, the average calling time and the longest calling time of the function of the application are stored in the log corresponding to the application, and the average calling time and the longest calling time are written into the log in. It can be known that the average call time and maximu...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com