CN111090570A - Method and device for measuring response time of terminal screen and terminal equipment - Google Patents

Method and device for measuring response time of terminal screen and terminal equipment Download PDF

Info

Publication number
CN111090570A
CN111090570A CN201911281909.8A CN201911281909A CN111090570A CN 111090570 A CN111090570 A CN 111090570A CN 201911281909 A CN201911281909 A CN 201911281909A CN 111090570 A CN111090570 A CN 111090570A
Authority
CN
China
Prior art keywords
terminal
time point
interface
time
terminal screen
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.)
Pending
Application number
CN201911281909.8A
Other languages
Chinese (zh)
Inventor
王明远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201911281909.8A priority Critical patent/CN111090570A/en
Publication of CN111090570A publication Critical patent/CN111090570A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording 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/3466Performance evaluation by tracing or monitoring
    • G06F11/349Performance evaluation by tracing or monitoring for interfaces, buses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Telephone Function (AREA)

Abstract

The invention is suitable for the technical field of communication, and provides a method and a device for measuring the response time of a terminal screen and terminal equipment, wherein the method comprises the following steps: acquiring an interrupt receiving time point when a terminal control center receives an interrupt signal, wherein the interrupt signal is a hardware signal sent to the terminal control center by a terminal screen after the terminal screen responds to a touch action; acquiring a finishing time point of the refreshing of the terminal interface, wherein the refreshed terminal interface is a new terminal interface redrawn by the terminal control center after responding to the interrupt signal; and calculating the response time consumption of the terminal screen according to the interrupt receiving time point and the completion time point. By the method and the device, the response time of the terminal screen can be quickly measured, the test threshold is reduced, the development and test of the measurement items of the response time of the terminal screen are facilitated, and the development and test efficiency is improved.

Description

Method and device for measuring response time of terminal screen and terminal equipment
Technical Field
The invention relates to the technical field of communication, in particular to a method and a device for measuring response time of a terminal screen and terminal equipment.
Background
The response time of the terminal screen is the speed of each pixel point on the terminal screen responding to the input signal within a period of time, and can be the time required for the pixel to change from dark to light, from light to dark or change in color. If the response time of the terminal screen is lower than a certain standard, the user can obviously feel the pause and the discomfort of the picture. In daily life, a tester or a user often feeds back the problem that mobile phone card pause operation is insensitive when playing certain games, but the problem that the game card pause operation is insensitive is also one of the reasons that the response time of a terminal screen is too slow, so that the response time of the terminal screen needs to be measured when the game or common application operation is insensitive. Wherein the measurement of the response time of the terminal screen is generally completed by measuring the time from the terminal screen clicking to the terminal interface finally refreshed.
The time from the point of the terminal screen to the final refreshed terminal interface is generally the whole time from the point of the screen to the final refreshed terminal interface is shot by using a high-speed camera, so that the total time from the point of the screen to the final refreshed terminal interface is calculated. However, shooting with a high-speed camera cannot quickly lock the refreshing positions of the click screen and the terminal interface in the shot video, and the measurement cost and the test environment are high, so that the method is not suitable for wide application.
Disclosure of Invention
The invention mainly aims to provide a method and a device for measuring the response time of a terminal screen and terminal equipment, and aims to solve the problems that the method for measuring the response time of the terminal screen in the prior art cannot be quickly positioned, has higher requirements on cost and test environment, and is not suitable for wide application.
In order to achieve the above object, a first aspect of the embodiments of the present invention provides a method for measuring a response time of a terminal screen, including:
acquiring an interrupt receiving time point when a terminal control center receives an interrupt signal, wherein the interrupt signal is a hardware signal sent to the terminal control center by a terminal screen after the terminal screen responds to a touch action;
acquiring a finishing time point of terminal interface refreshing, wherein the refreshed terminal interface is a new terminal interface redrawn after the terminal control center responds to the interrupt signal;
and calculating the response time consumption of the terminal screen according to the interrupt receiving time point and the completion time point.
With reference to the first aspect of the present invention, in a first implementation manner of the present invention, before acquiring an interrupt receiving time point when the terminal control center receives an interrupt signal, the method includes:
setting an interface refreshing button and monitoring the touch action;
and when the touch action triggers the interface refreshing button, triggering a terminal screen response time measurement event so as to enable the terminal screen to send the interrupt signal to the terminal control center, wherein the interrupt signal is used for enabling the terminal control center to redraw a new terminal interface.
With reference to the first implementation manner of the first aspect of the present invention, in a second implementation manner of the present invention, after triggering the terminal screen response time measurement event when the touch action triggers the interface refresh button, the method includes:
acquiring a trigger time point of the touch action trigger interface refreshing button;
acquiring a hardware signal received by the terminal control center after the trigger time point and a receiving time record of the hardware signal received by the terminal control center;
and acquiring an interrupt signal in the hardware signal through Systrace, and receiving the receiving time record of the interrupt signal by the terminal control center.
With reference to the first aspect of the present invention, in a third implementation manner of the present invention, the acquiring an interrupt receiving time point of an interrupt signal includes:
and analyzing the interrupt receiving time point of the interrupt signal according to the receiving time record and the triggering time point of the interrupt signal.
With reference to the first aspect of the present invention, in a fourth implementation manner of the present invention, the acquiring an interrupt receiving time point when the terminal control center receives an interrupt signal includes:
calling the SurfaceFlinger to output the drawing completion time point of each frame of terminal interface after replacement;
arranging the drawing completion time points according to the frame number sequence;
and taking the drawing completion time point of the last frame as the alternate completion time point of the terminal interface.
With reference to the fourth embodiment of the first aspect of the present invention, in a fifth embodiment of the present invention, before arranging the rendering completion time points in order of frame number, the method includes:
calculating the updating time of the terminal interface;
if the replacement time is within a preset range, executing the step of arranging the drawing completion time points according to the sequence of the number of frames;
and if the replacement time is out of the preset range, detecting a replacement abnormal event of the terminal interface, and marking the terminal interface with the replacement abnormality.
With reference to the fifth implementation manner of the first aspect of the present invention, in a sixth implementation manner of the present invention, the detecting a replacement abnormal event of the terminal interface includes:
obtaining the drawing time of the terminal interface of the ith frame;
comparing the drawing time of the terminal interface of the ith frame with the standard drawing time;
if the difference between the drawing time of the ith frame terminal interface and the standard drawing time is within the error range, drawing the ith frame terminal interface normally;
and if the difference between the drawing time of the ith frame terminal interface and the standard drawing time is out of the error range, drawing the ith frame terminal interface abnormally.
A second aspect of the embodiments of the present invention provides a device for measuring a response time of a terminal screen, including:
the system comprises an interrupt receiving time point acquisition module, a processing module and a processing module, wherein the interrupt receiving time point acquisition module is used for acquiring an interrupt receiving time point of an interrupt signal received by a terminal control center, and the interrupt signal is a hardware signal sent to the terminal control center by a terminal screen after the terminal screen responds to a touch action;
a completion time point obtaining module, configured to obtain a completion time point of refreshing a terminal interface, where the refreshed terminal interface is a new terminal interface redrawn by the terminal control center after responding to the interrupt signal;
and the terminal screen response time measuring module is used for calculating the terminal screen response time according to the interruption receiving time point and the completion time point.
A third aspect of embodiments of the present invention provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method provided in the first aspect when executing the computer program.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method as provided in the first aspect above.
The embodiment of the invention provides a method for measuring the response time of a terminal screen, which comprises the steps of calculating the response time of the terminal screen by acquiring the interrupt receiving time point of an interrupt signal sent by the terminal screen and the completion time point of the terminal interface refreshing after the terminal screen responds to a touch action, wherein the interrupt signal sent by the terminal screen represents the fixed time consuming stage of the terminal screen response, the terminal control center receives the interrupt signal and responds to the first non-fixed time consuming stage representing the terminal screen response, and the completion of the terminal interface refreshing represents the completion of the last non-fixed time consuming stage of the terminal screen response. The method for measuring the response time of the terminal screen provided by the embodiment of the invention can replace the traditional mode of shooting and measuring by using a high-speed camera, reduces the test threshold, is beneficial to developing and testing the measurement project consuming time of the response of the terminal screen, and improves the development and test efficiency.
Drawings
Fig. 1 is a block diagram of a hardware structure of a terminal device according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating an implementation flow of a method for measuring a response time of a terminal screen according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating an implementation of another method for measuring a response time of a terminal screen according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an actual application flow of the method for measuring the response time of the terminal screen provided in fig. 3 according to the embodiment of the present invention;
fig. 5 is a schematic diagram of a structure of a device for measuring response time of a terminal screen according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Suffixes such as "module", "part", or "unit" used to denote elements are used herein only for the convenience of description of the present invention, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
In the following description, the serial numbers of the embodiments of the invention are merely for description and do not represent the merits of the embodiments.
Fig. 1 shows a block diagram of a hardware configuration of a terminal device. The terminal device unlocking method provided by the embodiment of the present invention may be applied to the terminal device 10 shown in fig. 1, where the terminal device 10 may include, but is not limited to: the mobile terminal supports short-distance wireless communication and needs to be unlocked, such as a smart phone, a notebook, a tablet personal computer and wearable smart equipment.
As shown in fig. 1, the terminal device 10 includes a memory 101, one or more processors 103 (only one is shown), and optionally, may further include a memory controller 102, a peripheral interface 104, a radio frequency module 105, a key module 106, an audio module 107, a touch screen 108, and a short-range wireless communication module 109. These components may communicate with each other via one or more communication buses/signal lines 110.
It is to be understood that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the terminal device. Terminal device 10 may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
The memory 101 may be configured to store software programs and modules, such as a terminal device unlocking method and program instructions/modules corresponding to the terminal device in the embodiments of the present invention, and the processor 103 executes various functional applications and data processing by running the software programs and modules stored in the memory 101, so as to implement a terminal device unlocking method in the embodiments shown in fig. 2 and 3 described below, or implement a terminal device unlocking method in the embodiments shown in fig. 4 and 5 described below.
Memory 101 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 101 may further include memory located remotely from the processor 103, which may be connected to the terminal device 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. Access to the memory 101 by the processor 103 and possibly other components may be under the control of the memory controller 102.
The peripheral interface 104 couples various input/output devices to the CPU and to the memory 101. Processor 103 executes various software, instructions within memory 101 to perform various functions of terminal device 10 and to perform data processing.
In some embodiments, the peripheral interface 104, the processor 103, and the memory controller 102 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips.
The rf module 105 is used for receiving and transmitting electromagnetic waves, and implementing interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The rf Module 105 may include various existing circuit elements for performing these functions, such as an antenna, an rf transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, a memory, and so forth. The rf module 105 may communicate with various networks such as the internet, an intranet, a preset type of wireless network, or other devices through a preset type of wireless network. The preset types of wireless networks described above may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The Wireless network of the above-mentioned preset type may use various Communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), bluetooth, Wireless Fidelity (WiFi) (e.g., IEEE802.11 a, IEEE802.11 b, IEEE802.1 g and/or IEEE802.11 n), Voice over Internet protocol (VoIP), Internet Access (Wi-Max), Worldwide Interoperability for Mobile Communication (Wi-Mobile Communication), other protocols for email, instant messaging, and short messaging, and any other suitable messaging protocol.
The key module 106 provides an interface for a user to input to the terminal device, and the user can press different keys to cause the terminal device 10 to perform different functions.
Audio module 107 provides an audio interface to a user that may include one or more microphones, one or more speakers, and audio circuitry. The audio circuitry receives audio data from the peripheral interface 104, converts the audio data to electrical information, and transmits the electrical information to the speaker. The speaker converts the electrical information into sound waves that the human ear can hear. The audio circuitry also receives electrical information from the microphone, converts the electrical information to voice data, and transmits the voice data to the peripheral interface 104 for further processing. The audio data may be retrieved from the memory 101 or through the radio frequency module 105. In addition, the audio data may also be stored in the memory 101 or transmitted through the radio frequency module 105. In some examples, audio module 107 may also include a headphone jack for providing an audio interface to headphones or other devices.
The touch screen 108 provides both an output and an input interface between the terminal device and the user. In particular, the touch screen 108 displays video output to the user, the content of which may include text, graphics, video, and any combination thereof. Some of the output results are for some of the user interface objects. The touch screen 108 also receives user inputs, such as user clicks, swipes, and other gesture operations, for the user interface objects to respond to these user inputs. The technique of detecting user input may be based on resistive, capacitive, or any other possible touch detection technique. Specific examples of touch screen 108 display units include, but are not limited to, liquid crystal displays or light emitting polymer displays.
The short-range wireless Communication module 109 can perform Identification and data exchange with a compatible device in a short range by using a short-range Communication protocol such as NFC (Near Field Communication) or RFID (Radio Frequency Identification).
Further, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium may be disposed in the terminal device in each of the foregoing embodiments and the following embodiments, and the computer-readable storage medium may be the memory in the foregoing embodiment shown in fig. 1. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, can implement a method for measuring a response time of a terminal screen as in the embodiments of fig. 2 to 4 described below.
As shown in fig. 2, an embodiment of the present invention provides a method for measuring a response time of a terminal screen, including, but not limited to, the following steps:
s201, acquiring an interrupt receiving time point when the terminal control center receives the interrupt signal.
And the interrupt signal is a hardware signal sent to the terminal control center by the terminal screen after the terminal screen responds to the touch action.
S202, obtaining the time point of the completion of the terminal interface refreshing.
And the refreshed terminal interface is a new terminal interface redrawn by the terminal control center after responding to the interrupt signal.
S203, calculating the response time consumption of the terminal screen according to the interruption receiving time point and the completion time point.
In an embodiment of the present invention, the terminal screen is a touch screen.
Based on the above steps S201 to S203, in practical applications, the response of the terminal screen to the game or application is mainly divided into the following time stages:
stage one: the user makes a preset touch action on the capacitive surface of the terminal screen → the terminal screen performs signal processing → the terminal screen outputs an interrupt signal.
For the time consumed by the stage one, usually, a probe is placed on a single body on the surface of the touch screen, the touch screen is quickly clicked and tested, waveforms triggered by signals in the single body of the touch screen are compared, and the output time of an interrupt signal of a screen of a test terminal is compared, so that the average time delay can be calculated. Therefore, the time consumption of the first stage is related to the capability of the hardware, and the time consumption of the first stage is basically fixed after the hardware is fixed.
It can be understood that the response time of the terminal screen measured in the embodiment of the present invention does not include the fixed time consumption of the above-mentioned stage.
And a second stage: the terminal system receives and responds to the interrupt signal from the terminal screen, thereby activating the working state of the CPU.
And a third stage: inputting interrupt signal into interrupt controller → entering terminal screen drive → registering in the entry function of platform interrupt signal → executing work queue in terminal screen interrupt function → calling controller and terminal screen communication at I2C platform end → completing reporting of input event.
And a fourth stage: the application corresponding to the current foreground receives the report of the input event → performs corresponding logic processing (such as redrawing the current interface) → finishing the real output of the screen to the screen through surfefinger processing, thereby finishing the updating of the screen.
In the embodiment of the present invention, the time point of acquiring the interrupt signal at the terminal system in step S201 is to acquire the time point of receiving and responding the interrupt signal from the terminal screen by the terminal system, and the time point of acquiring the completion time point of the terminal interface refresh in step S202 is to acquire the time point of completing the update of the terminal screen, so that two important stages of the terminal screen response can be quickly located by using the interrupt signal and the relevant information of the terminal interface refresh as the object to be acquired, thereby calculating the time consumed by the terminal screen response.
According to the method for measuring the response time of the terminal screen, provided by the embodiment of the invention, after the terminal screen responds to the touch action, the terminal control center receives the interrupt receiving time point of the interrupt signal sent by the terminal screen and the terminal interface refreshing completion time point, and calculates the response time consumption of the terminal screen, wherein the interrupt signal sent by the terminal screen represents the fixed time consumption stage of the terminal screen response, the terminal control center receives the interrupt signal and responds to the first non-fixed time consumption stage representing the terminal screen response, and the terminal interface refreshing completion represents the completion of the last non-fixed time consumption stage of the terminal screen response. The method for measuring the response time of the terminal screen provided by the embodiment of the invention can replace the traditional mode of shooting and measuring by using a high-speed camera, reduces the test threshold, is beneficial to developing and testing the measurement project consuming time of the response of the terminal screen, and improves the development and test efficiency.
As shown in fig. 3, the embodiment of the present invention provides another terminal screen response time measuring method based on the terminal screen response time measuring method provided in fig. 2, including but not limited to the following steps:
s301, setting an interface refreshing button, and monitoring the touch action.
In step S301, the interface refresh button may be an application program installed in the terminal, and is called when the response time of the terminal screen needs to be measured, and is displayed on the terminal screen.
And if the interface refreshing button is called, starting to monitor the touch action, namely continuously detecting whether the user has the action of clicking the interface refreshing button, so as to judge whether a terminal screen response time measurement event is triggered or not and whether to start to execute the measurement of the time consumed by the terminal screen response.
S302, when the touch action triggers the interface refreshing button, triggering a terminal screen response time measuring event so that the terminal screen sends the interrupt signal to the terminal control center.
And the interrupt signal is used for enabling the terminal control center to redraw a new terminal interface.
In step S302, after triggering the terminal screen response time measurement event, the terminal screen sends an interrupt signal to the terminal control center, and the terminal control center responds based on the interrupt signal after receiving the interrupt signal, that is, refreshes the current terminal interface. And the refreshing process of the current terminal interface is the process of redrawing a new terminal interface.
In a specific application, after the step S301 and the step S302 are the aforementioned stage one of the terminal screen response and the terminal screen response time measurement event is triggered, the terminal control center responds based on the interrupt signal, i.e., the aforementioned stage two of the terminal screen response.
In an embodiment, after the step S302, the method may further include:
s3021, acquiring a trigger time point of the touch action trigger interface refreshing button;
and S3022, acquiring the hardware signal received by the terminal control center after the trigger time point, and acquiring a receiving time record of the hardware signal received by the terminal control center.
S3023, acquiring the interrupt signal in the hardware signal through Systrace, and receiving the receiving time record of the interrupt signal by the terminal control center.
The acquiring actions in the above steps S3021 to S3023 are all acquiring information from the terminal control center or the terminal screen, and through the above steps S3021 to S3023, all the interrupt signals received by the terminal control center after the touch action of the user triggers the interface refresh button, and the receiving time record generated by the terminal control center receiving the interrupt signals can be collected.
The terminal control center receives various hardware signals and is used for informing the terminal control center to execute different tasks, such as startup and shutdown, sound adjustment, data transmission and the like.
In the embodiment of the present invention, by systrace, only the function of outputting and acquiring the interrupt signal can be turned on, such as: starting a child thread by reading the following system file: "/d/tracing/trace _ pipe", so as to obtain the interrupt signal recorded by sysstrace and the corresponding time point after the touch action triggers the interface refresh button.
In practical application, sysstrace is a self-contained system analysis tool in an Android system, and functions of the sysstrace include tracking of I/O operations of the system, kernel work queues, CPU loads, running conditions of subsystems of the Android and the like. The principle is roughly as follows: some information labels are inserted into some key links (such as System Service, virtual machine, Binder drive, etc.) of the System, the execution time of a certain core process is determined by the start and the end of the Label, and then the Label is collected to obtain the operation time information of the key path of the System, thereby obtaining the operation performance information of the whole System.
S303, acquiring an interrupt receiving time point when the terminal control center receives the interrupt signal.
According to the steps S301, S302, and S3021 to S3023, one implementation manner of the step S303 may be:
and analyzing the interrupt receiving time point of the interrupt signal according to the receiving time record and the triggering time point of the interrupt signal.
After acquiring the interrupt signal after the trigger time point and the receiving time record of the interrupt signal, the interrupt signal closest to the time point of the user trigger interface refresh button can be found out, where the interrupt signal is the hardware signal received by the terminal control center, and the interrupt receiving time point of the interrupt signal is the time point of the terminal control center responding to the terminal signal, that is, the start time point of the terminal screen response stage two described above.
And S304, acquiring the time point for finishing the refreshing of the terminal interface.
In the above step S303 and step S304, the time point when the terminal interface is refreshed and the time point when the terminal control center receives the interrupt signal, that is, the time points of the second stage and the fourth stage of the terminal response, are obtained, so that the total time consumption of the terminal screen response, that is, the time consumption of the terminal screen response in the following step S305, can be obtained from the time point when the terminal control center receives the interrupt signal to the time point when the terminal interface is refreshed.
In one embodiment, one implementation manner of the step S304 may be;
s3041, calling a SurfaceFlinger to output a drawing completion time point of each frame of terminal interface after replacement;
s3042, arranging the drawing completion time points according to the sequence of the frame numbers;
s3043, the drawing completion time point of the last frame is used as the completion time point of the terminal interface alternation.
In the above steps S3041 to S3043, the drawing completion time point of each frame of the terminal interface in the terminal interface refreshing process may be output by calling the surface flicker, wherein when the drawing of the terminal interface of the last frame is completed, the drawing completion time point is not updated, and therefore, the drawing completion time point of the last frame may be used as the terminal interface alternate completion time point.
In a specific application, the surfefinger is a system service of the Android system, and the function of the surfefinger includes managing an Android frame buffer, so that the surfefinger can be called when a related command is input.
For example, the following commands are input:
adb shell dumpsys SurfaceFlinger--latency<window_activity>;
wherein < window _ activity > represents the corresponding layer name to be viewed.
Similar information can be obtained as follows:
Figure BDA0002316988640000121
Figure BDA0002316988640000131
the third column indicates the drawing completion time point of each frame of terminal interface of the layer, and the drawing completion time point of the terminal interface of the last frame is close to the completion time point of the terminal interface alternation of the step S3043, or the time point of the terminal screen interface output display to the terminal screen after the replacement in the terminal response stage four as described above.
In specific application, the condition that the response time of the terminal screen is too long can include various conditions, and a more targeted detection method can be used for specifically positioning a response stage in which an abnormality occurs, such as whether a detection terminal control center receives an interrupt signal, whether the terminal screen sends a terminal signal, whether the terminal interface is abnormal or not, and the like.
In the embodiment of the present invention, before the step S3043, that is, after the drawing completion time point of each frame of the terminal interface is obtained, the replacement time for refreshing the terminal interface is detected immediately, so that the abnormal response condition of the terminal screen caused by the abnormal refreshing of the terminal interface can be located, which includes the following steps:
s30431, calculating the refreshing replacement time of the terminal interface;
s30432, if the replacement time is within a preset range, executing a step of arranging the drawing completion time points according to the sequence of the number of frames;
s30433, if the replacement time is outside the preset range, detecting a replacement abnormal event of the terminal interface, and marking the terminal interface with the replacement abnormal event.
In the above steps S30431 to S30433, the preset range may be history replacement time or standard replacement time, and if the currently calculated replacement time is within the preset range, it may be determined that the terminal interface is abnormal in refresh, so as to cause an abnormal condition of terminal screen response.
The embodiment of the present invention further provides a detailed implementation process for detecting a replacement abnormal event of the terminal interface in step S30433, where the detailed implementation process includes:
obtaining the drawing time of the terminal interface of the ith frame;
comparing the drawing time of the terminal interface of the ith frame with the standard drawing time;
if the difference between the drawing time of the ith frame terminal interface and the standard drawing time is within the error range, drawing the ith frame terminal interface normally;
and if the difference between the drawing time of the ith frame terminal interface and the standard drawing time is out of the error range, drawing the ith frame terminal interface abnormally.
In a specific application, the drawing time of the terminal interface of the ith frame can be obtained through sysstrace, and it can be understood that when the time consumption of other response phases needs to be detected, the time consumption of the corresponding response phase can also be obtained through the sysstrace, so that the abnormal point can be quickly located.
In specific application, when the drawing of the ith frame terminal interface is detected to be abnormal, a mark is added to the ith frame terminal interface, so that a technician can repair the ith frame terminal interface conveniently.
S305, calculating the response time consumption of the terminal screen according to the interrupt receiving time point and the completion time point.
As shown in fig. 4, the embodiment of the present invention provides an actual application diagram of the terminal screen response time measurement shown in fig. 3, so as to describe the application process of the above step S301 to step S305.
In fig. 4, a tester interface refreshes a button, refreshes a terminal interface, acquires an interrupt receiving time point of an interrupt signal executed by a terminal control center through sysstrace, and acquires an alternate finishing time point of the terminal interface through surface flickers, thereby calculating time consumption of a second stage to a fourth stage.
As shown in fig. 5, an embodiment of the present invention further provides a terminal screen response time measuring apparatus 50, including:
an interrupt receiving time point obtaining module 51, configured to obtain an interrupt receiving time point when the terminal control center receives the interrupt signal.
The interrupt signal is a hardware signal sent to the terminal control center by the terminal screen after the terminal screen responds to the touch action;
and a completion time point obtaining module 52, configured to obtain a completion time point of the terminal interface refresh.
The refreshed terminal interface is a new terminal interface redrawn by the terminal control center after responding to the interrupt signal;
and a terminal screen response time measuring module 53, configured to calculate a terminal screen response time according to the interrupt receiving time point and the completion time point.
The terminal control center receives various hardware signals and is used for informing the terminal control center to execute different tasks, such as startup and shutdown, sound adjustment, data transmission and the like.
In a specific application, by systrace, only the function of outputting and acquiring the interrupt signal can be started, such as: starting a child thread by reading the following system file: "/d/tracing/trace _ pipe", so as to obtain the interrupt signal recorded by sysstrace and the corresponding time point after the touch action triggers the interface refresh button.
In a specific application, the drawing completion time point of each frame of the terminal interface in the terminal interface refreshing process can be output by calling the surfeFinger, wherein when the drawing of the terminal interface of the last frame is completed, the drawing completion time point is not updated, and therefore, the drawing completion time point of the last frame can be used as the alternate completion time point of the terminal interface.
In the embodiment of the present invention, the time point when the terminal interface is refreshed and the time point when the terminal control center receives the interrupt signal are obtained, that is, the time points of the second stage and the fourth stage of the terminal response are obtained, so that the total time consumption of the terminal screen response, that is, the time consumption of the terminal screen response in the terminal screen response time measurement module, can be obtained from the time point when the terminal control center receives the interrupt signal to the time point when the terminal interface is refreshed.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the foregoing embodiments illustrate the present invention in detail, those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A method for measuring the response time of a terminal screen is characterized by comprising the following steps:
acquiring an interrupt receiving time point when a terminal control center receives an interrupt signal, wherein the interrupt signal is a hardware signal sent to the terminal control center by a terminal screen after the terminal screen responds to a touch action;
acquiring a finishing time point of terminal interface refreshing, wherein the refreshed terminal interface is a new terminal interface redrawn after the terminal control center responds to the interrupt signal;
and calculating the response time consumption of the terminal screen according to the interrupt receiving time point and the completion time point.
2. The method for measuring the response time of the terminal screen according to claim 1, wherein the step of acquiring the interrupt reception time point when the terminal control center receives the interrupt signal comprises:
setting an interface refreshing button and monitoring the touch action;
and when the touch action triggers the interface refreshing button, triggering a terminal screen response time measurement event so as to enable the terminal screen to send the interrupt signal to the terminal control center, wherein the interrupt signal is used for enabling the terminal control center to redraw a new terminal interface.
3. The terminal screen response time measuring method of claim 2, wherein after triggering the terminal screen response time measuring event when the touch action triggers the interface refresh button, comprising:
acquiring a trigger time point of the touch action trigger interface refreshing button;
acquiring a hardware signal received by the terminal control center after the trigger time point and a receiving time record of the hardware signal received by the terminal control center;
and acquiring an interrupt signal in the hardware signal through Systrace, and receiving the receiving time record of the interrupt signal by the terminal control center.
4. The terminal screen response time measuring method of claim 1, wherein the acquiring of the interrupt reception time point of the interrupt signal comprises:
and analyzing the interrupt receiving time point of the interrupt signal according to the receiving time record and the triggering time point of the interrupt signal.
5. The method for measuring the response time of the terminal screen according to claim 1, wherein the acquiring the interrupt reception time point at which the terminal control center receives the interrupt signal comprises:
calling the SurfaceFlinger to output the drawing completion time point of each frame of terminal interface after replacement;
arranging the drawing completion time points according to the frame number sequence;
and taking the drawing completion time point of the last frame as the alternate completion time point of the terminal interface.
6. The terminal screen response time measuring method of claim 5, wherein arranging the drawing completion time points before in order of frame number comprises:
calculating the updating time of the terminal interface;
if the replacement time is within a preset range, executing the step of arranging the drawing completion time points according to the sequence of the number of frames;
and if the replacement time is out of the preset range, detecting a replacement abnormal event of the terminal interface, and marking the terminal interface with the replacement abnormality.
7. The terminal screen response time measuring method of claim 6, wherein the detecting of the replacement abnormal event of the terminal interface comprises:
obtaining the drawing time of the terminal interface of the ith frame;
comparing the drawing time of the terminal interface of the ith frame with the standard drawing time;
if the difference between the drawing time of the ith frame terminal interface and the standard drawing time is within the error range, drawing the ith frame terminal interface normally;
and if the difference between the drawing time of the ith frame terminal interface and the standard drawing time is out of the error range, drawing the ith frame terminal interface abnormally.
8. A terminal screen response time measuring apparatus, comprising:
the system comprises an interrupt receiving time point acquisition module, a processing module and a processing module, wherein the interrupt receiving time point acquisition module is used for acquiring an interrupt receiving time point of an interrupt signal received by a terminal control center, and the interrupt signal is a hardware signal sent to the terminal control center by a terminal screen after the terminal screen responds to a touch action;
a completion time point obtaining module, configured to obtain a completion time point of refreshing a terminal interface, where the refreshed terminal interface is a new terminal interface redrawn by the terminal control center after responding to the interrupt signal;
and the terminal screen response time measuring module is used for calculating the terminal screen response time according to the interruption receiving time point and the completion time point.
9. A terminal device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method for measuring response time of a terminal screen according to any one of claims 1 to 7 when executing the computer program.
10. A storage medium which is a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the terminal screen response time measuring method according to any one of claims 1 to 7.
CN201911281909.8A 2019-12-13 2019-12-13 Method and device for measuring response time of terminal screen and terminal equipment Pending CN111090570A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911281909.8A CN111090570A (en) 2019-12-13 2019-12-13 Method and device for measuring response time of terminal screen and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911281909.8A CN111090570A (en) 2019-12-13 2019-12-13 Method and device for measuring response time of terminal screen and terminal equipment

Publications (1)

Publication Number Publication Date
CN111090570A true CN111090570A (en) 2020-05-01

Family

ID=70395528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911281909.8A Pending CN111090570A (en) 2019-12-13 2019-12-13 Method and device for measuring response time of terminal screen and terminal equipment

Country Status (1)

Country Link
CN (1) CN111090570A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113688019A (en) * 2021-08-10 2021-11-23 荣耀终端有限公司 Response time duration detection method and device
CN114647336A (en) * 2022-03-15 2022-06-21 Oppo广东移动通信有限公司 Click delay measuring method and device, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005276074A (en) * 2004-03-26 2005-10-06 Hitachi Information Systems Ltd Response time measuring displaying system and displaying method
CN104008031A (en) * 2014-05-23 2014-08-27 张滨 Method and device for testing response time of capacitive touch screen
CN105302701A (en) * 2014-06-23 2016-02-03 中兴通讯股份有限公司 Method, apparatus and device for testing reaction time of terminal user interface
CN106951346A (en) * 2016-01-06 2017-07-14 阿里巴巴集团控股有限公司 The method of testing and device of a kind of response time
CN110058997A (en) * 2019-03-12 2019-07-26 平安普惠企业管理有限公司 Application response time test method, device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005276074A (en) * 2004-03-26 2005-10-06 Hitachi Information Systems Ltd Response time measuring displaying system and displaying method
CN104008031A (en) * 2014-05-23 2014-08-27 张滨 Method and device for testing response time of capacitive touch screen
CN105302701A (en) * 2014-06-23 2016-02-03 中兴通讯股份有限公司 Method, apparatus and device for testing reaction time of terminal user interface
CN106951346A (en) * 2016-01-06 2017-07-14 阿里巴巴集团控股有限公司 The method of testing and device of a kind of response time
CN110058997A (en) * 2019-03-12 2019-07-26 平安普惠企业管理有限公司 Application response time test method, device, computer equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113688019A (en) * 2021-08-10 2021-11-23 荣耀终端有限公司 Response time duration detection method and device
CN113688019B (en) * 2021-08-10 2022-08-09 荣耀终端有限公司 Response time duration detection method and device
CN114647336A (en) * 2022-03-15 2022-06-21 Oppo广东移动通信有限公司 Click delay measuring method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN107102936B (en) Fluency evaluation method, mobile terminal and storage medium
CN112229507B (en) Ambient light detection method and device, storage medium and mobile terminal
CN107291586B (en) Application program analysis method and device
CN108055092B (en) Bluetooth signal adjusting method, device, test terminal, system and readable medium
CN109753425B (en) Popup window processing method and device
CN109542279B (en) Terminal device control method and terminal device
CN112415367B (en) Drive chip abnormality detection method, drive chip abnormality detection device, electronic device and readable storage medium
CN110895509B (en) Test processing method and device, electronic equipment and storage medium
WO2018161540A1 (en) Fingerprint registration method and related product
CN108446211A (en) Browser exception collection method, device, mobile terminal and storage medium
CN108234035A (en) Transmission power adjustment method, device, terminal test system and electric terminal
CN108199787A (en) Transmission power adjustment method, device, terminal test system and electric terminal
CN111090570A (en) Method and device for measuring response time of terminal screen and terminal equipment
WO2015027864A1 (en) Method, device and touch screen apparatus for refreshing content of draggable listview
CN107896256B (en) Information pushing method and device, mobile terminal, server and readable storage medium
CN111273955B (en) Thermal restoration plug-in optimization method and device, storage medium and electronic equipment
CN109582565A (en) Prevent the method, terminal and computer storage medium of application crashes
CN107066374B (en) Data processing method and mobile terminal
CN112199246B (en) Terminal test method and device, storage medium and mobile terminal
CN109218082B (en) Network configuration parameter processing method, device and equipment
CN108965042B (en) Network delay obtaining method and device, terminal equipment and storage medium
CN106709330B (en) Method and device for recording file execution behaviors
CN108027967B (en) Image stitching method and electronic equipment
CN109040457B (en) Screen brightness adjusting method and mobile terminal
CN115600213A (en) Vulnerability management method, device, medium and equipment based on application program

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200501