Application program starting time testing method

A technology of application programs and start-up time, applied in the computer field, can solve the problems of affecting accuracy, cumbersome testing process, low efficiency, etc., and achieve the effect of wide application range and convenient testing process

Pending Publication Date: 2021-02-19
UNIONTECH SOFTWARE TECH CO LTD
0 Cites 0 Cited by

AI-Extracted Technical Summary

Problems solved by technology

Because the LOG mark is required, the source code of the application needs to be obtained, and the source code is tagged for compilation. The specific testing process is cumbe...
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Abstract

The invention discloses an application program starting time testing method, and the method comprises the following steps: starting a first main process, and creating a second sub-process and a thirdsub-process through the first main process; enabling the second sub-process to start an application program according to the application program list and record first time for starting the applicationprogram, wherein the application program list comprises a plurality of application programs; enabling the third sub-process to monitor an application program window display event and obtain application program window display information including an application program name and an application program process number associated with the application program window display event and second time whenthe application program window display event is monitored; enabling the third sub-process to send the application program window display information to the second sub-process; enabling the second sub-process to calculate the starting time consumption of the currently started application program according to the first time and the second time, and starting the next application program according tothe application program list. The invention further discloses a corresponding device, computing equipment and a readable storage medium.

Application Domain

Technology Topic

Start up timeMultiple applications +6

Image

  • Application program starting time testing method
  • Application program starting time testing method
  • Application program starting time testing method

Examples

  • Experimental program(1)

Example Embodiment

[0021]An exemplary embodiment of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be implemented in various forms and should not be restricted herein. Instead, it is provided to provide more thoroughly understood the present disclosure, and can communicate the scope of the disclosure to those skilled in the art.
[0022]figure 1 A schematic diagram of a computing device 100 in accordance with one embodiment of the present invention is shown. It should be noted,figure 1 The computing device 100 shown is only one example, in practice, the computing device for implementing the application startup time test method for implementing the present invention can be an arbitrary model device, and its hardware configuration can befigure 1 The computing device 100 shown may also befigure 1 The computing device 100 shown is different. Practice The computing device of the application startup time test method for implementing the present invention can befigure 1 The hardware components shown in the computing device 100 are increased or deleted, and the specific hardware configuration of the computing device is not limited.
[0023]Such asfigure 1 As shown, in the basic configuration 102, computing device 100 typically includes system memory 106 and one or more processor 104. Memory bus 108 can be used to communicate between processor 104 and system memory 106.
[0024]Depending on the desired configuration, processor 104 can be any type of process, including, but not limited to, microprocessor (μP), microcontroller (μC), digital information processor (DSP), or any combination thereof. Processor 104 may include a cache, processor core 114, and register 116, such as one or more levels, such as one or more secondary cache 112. Examples of processor core 114 may include an operation logic unit (ALU), a floating point unit (FPU), a digital signal processing core (DSP core), or any combination thereof. The memory controller 118 of the example can be used with the processor 104, or in some implementations, the memory controller 118 can be an internal portion of the processor 104.
[0025]Depending on the desired configuration, the system memory 106 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. The physical memory in the computing device generally refers to the volatile memory RAM, and the data in the disk needs to be loaded into the physical memory to be read by the processor 104. The system memory 106 may include an operating system 120, one or more applications 122, and program data 124. In some embodiments, the application 122 may be arranged to be executed by one or more processors 104 using program data 124 on an operating system. The operating system 120 may be, for example, Linux, Windows, etc., and it includes program instructions for processing basic system services and performing hardware-dependent tasks. The application 122 includes program instructions for implementing various functions desired by the user. The application 122 may be, for example, a browser, instant messaging software, software development tools (such as an integrated development environment IDE, a compiler, etc.), but is not limited thereto. When the application 122 is installed in the computing device 100, a driver module can be added to the operating system 120.
[0026]When the computing device 100 starts to run, the processor 104 reads the program instructions of the operating system 120 from the memory 106 and executes them. The application 122 runs on the operating system 120 and uses the interface provided by the operating system 120 and the underlying hardware to implement various functions desired by the user. When the user starts the application 122, the application 122 is loaded into the memory 106, and the processor 104 reads and executes the program instructions of the application 122 from the memory 106.
[0027]The computing device 100 further includes a storage device 132. The storage device 132 includes a removable storage 136 and a non-removable storage 138. Both the removable storage 136 and the non-removable storage 138 are connected to the storage interface bus 134.
[0028]The computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (eg, output device 142, peripheral interface 144, and communication device 146) to the basic configuration 102 via the bus/interface controller 130. The exemplary output device 142 includes a graphics processing unit 148 and an audio processing unit 150. They can be configured to facilitate communication with various external devices such as displays or speakers via one or more A/V ports 152. The example peripheral interface 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication via one or more I/O ports 158 and input devices such as keyboards, mice, pens, etc. , Voice input devices, touch input devices) or other peripherals (such as printers, scanners, etc.) to communicate. The example communication device 146 may include a network controller 160, which may be arranged to facilitate communication with one or more other computing devices 162 via a network communication link via one or more communication ports 164.
[0029]A network communication link may be an example of a communication medium. The communication medium may generally be embodied as computer readable instructions, data structures, and program modules in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium. A "modulated data signal" can be a signal in which one or more of its data sets or its change can be carried out in a way of encoding information in the signal. As a non-limiting example, communication media may include wired media such as a wired network or a dedicated line network, and various wireless media such as sound, radio frequency (RF), microwave, infrared (IR), or other wireless media. The term computer readable media used herein may include both storage media and communication media.
[0030]In the computing device 100 according to the present invention, the application 122 includes instructions for executing the application startup time testing method 200 of the present invention, and the instructions can instruct the processor 104 to execute the application startup time testing method 200 of the present invention.
[0031]figure 2 Shows a flowchart of a method 200 for testing application startup time according to an embodiment of the present invention. The method 200 is suitable for running on a computing device (such asfigure 1 Shown in the computing device).
[0032]Such asfigure 2 As shown, the method 200 starts at step S210, a main process (first main process) of the test method is started, and two sub-processes (a second sub-process and a third sub-process) are created through the main process.
[0033]In the subsequent step S220, one of the sub-processes (the second sub-process) starts one of the applications according to the application list, and records the current time as the first time in the process of starting the application.
[0034]According to an embodiment of the present invention, the application list includes multiple applications whose startup time is to be tested, which can be expressed in the form shown in Table 1. According to the application list, the second child process first obtains the first application, that is, application 1, sends the startup instruction of application 1, and records the current time as the first time in the startup process of application 1, and also records The name of the application.
[0035]Table 1
[0036] Serial number Application name 1 Application 1 2 Application 2 3 Application 3 …… ……
[0037]In the subsequent step S230, another child process (that is, the third child process) will monitor the window display event of the started application. The window display event occurs, and the user can see the display window of the application on the screen. After the application is started, the corresponding window display information is obtained and sent to the second child process. The window display information includes the application name and application process number associated with the application window display event, and the application window is monitored Show the time of the event (second time).
[0038]According to an embodiment of the present invention, the communication between the second sub-process and the third sub-process is implemented through a shared queue (that is, the first shared queue). The specific process is that the third sub-process displays the acquired application window display information Send to the first shared queue, and the second child process will read the data in the first shared queue and obtain the window display information corresponding to the application started by the second child process, which can be based on the recorded application name For acquiring, for example, if the application currently started by the second sub-process is application 1, the window display information associated with application 1 is acquired from the first shared queue.
[0039]After obtaining the window display information, the second sub-process proceeds to step S240. The second sub-process calculates the startup consumption of the currently started application according to the second time in the application window display information and the first time recorded in step S220. Time. Calculate the startup time of the application by calculating the difference between the second time and the first time. For example, the first time in the startup process of application 1 is 9:15:30 and 200 milliseconds, and the second time is 9 on the same day. 15 minutes 30 seconds and 700 milliseconds, the startup time of application 1 is 500 milliseconds, and the second child process records the startup time in the log file after calculating the startup time. That is, the startup time of application 1, 500 milliseconds is recorded to In the log file, the specific log file format can be formatted according to data requirements, which is not limited in the present invention.
[0040]After calculating the startup time of the current application, go to step S250 to obtain the next application to be tested according to the application list. For example, the currently tested application is application 1. Take Table 1 as an example. In the step, application 2 will be obtained for testing.
[0041]After the application 2 is obtained, step S220 is entered again to send the startup instruction of the application 2, and record the current time as the first time in the startup process of the application 2.
[0042]Then enter step S230, the third sub-process monitors the window display event of the application program, and writes window display information related to the window display event into the first shared queue.
[0043]According to an embodiment of the present invention, the currently launched application 2 fails to start due to a file error. In this step, the third child process cannot detect its window display event, and the second child process cannot start from the first The window display information corresponding to application 2 is obtained in the shared queue. After waiting for a predetermined time (for example, 10 seconds), the second child process directly records the application startup timeout, and records the application name and its startup timeout status in the log File.
[0044]Then enter step S250 to obtain the next application to be tested. According to Table 1, application 3 will be obtained, and application 3 will be started through step S220. According to an embodiment of the present invention, application 3 is installed, then The second sub-process directly records the uninstalled state of the application 3 in the log file, and proceeds to step S250 to continue to obtain the next application.
[0045]In step S250, when all the applications in the application list have been tested and the next application fails to be obtained, step S260 is entered. In step S260, the second sub-process sends the test completion information to the first main process.
[0046]According to an embodiment of the present invention, the communication between the second sub-process and the first main process is realized through a pipeline file, the second sub-process sends the test completion information to the first pipeline file, and the first main program starts from the first pipeline file. Get test completion information in.
[0047]When the first main program obtains the test completion information, it proceeds to step S270, ends the two sub-processes (the first sub-process and the second sub-process) created by it, and exits.
[0048]image 3 Shows a block diagram of a device 300 for testing application startup time according to an embodiment of the present invention. The device 300 is suitable for resident in a computing device (such asfigure 1 In the illustrated computing device), the method 200 is suitable for execution. The device 300 includes a first main process module 310, a second sub process module 320, and a third sub process module 330.
[0049]The first main process module 310 is the main process that runs the application startup time test method, and is used to create the second sub-process module 320 and the third sub-process module 330, and after receiving the application test sent by the second sub-process module 320 When the information is completed, the operation of the second sub-process module 320 and the third sub-process module 330 is ended and exited.
[0050]The second sub-process module 320 is adapted to start one of the applications according to the order of the applications in the application list, while recording that the current time is the first time in the application start-up process, and the third sub-process module 330 receives When the second time of the event is displayed in the application window, the startup time of the application is calculated according to the first time and the second time and recorded in the log file.
[0051]If the predetermined time period is exceeded, the application window display information is still received, and the name of the corresponding application and the startup timeout status are recorded in the log file.
[0052]When the application to be tested is an uninstalled program, record the application name and the uninstalled status in the log file.
[0053]The third sub-process module 330 is adapted to monitor window display events, and when a window display event is detected, obtain window display information, including the application name and application process number associated with the window display event, and the current time (ie, the application startup process At the second time), the window display information is sent to the second sub-process module, and the communication between the third sub-process module and the second sub-process module can be realized through a shared queue.
[0054]According to the application startup time test method of the present invention, the test is performed according to the window display event. The occurrence of the window display event marks the completion of the application startup, and the user can see the display window of the application on the screen, so start from the sending application Instruction to the occurrence of a window display event is the time it takes for the application to start. In the present invention, two sub-processes are used to obtain the designated time for sending the application start and the time when the window display event occurs, and calculate the application start time according to these two times. Application list, after one application test is completed, enter the test of the next application. Through the application list, the startup time of different applications is tested. At the same time, this test method does not need to modify the source code. Therefore, the test The process is convenient and accurate, and can be applied to any application scenario with a wide range of applications.
[0055]The various technologies described here can be implemented in combination with hardware or software, or a combination of them. Therefore, the method and device of the present invention, or some aspects or parts of the method and device of the present invention may be embedded in a tangible medium, such as a removable hard disk, U disk, floppy disk, CD-ROM, or any other machine-readable storage medium In the form of program code (i.e. instructions) in, when the program is loaded into a machine such as a computer and executed by the machine, the machine becomes a device for practicing the present invention.
[0056]When the program code is executed on a programmable computer, the computing device generally includes a processor, a storage medium readable by the processor (including volatile and nonvolatile memory and/or storage elements), and at least one input device, And at least one output device. The memory is configured to store program code; the processor is configured to execute the application startup time test method of the present invention according to instructions in the program code stored in the memory.
[0057]By way of example and not limitation, readable media include readable storage media and communication media. The readable storage medium stores information such as computer readable instructions, data structures, program modules, or other data. Communication media generally embody computer readable instructions, data structures, program modules or other data in modulated data signals such as carrier waves or other transmission mechanisms, and include any information delivery media. Combinations of any of the above are also included in the scope of readable media.
[0058]In the instructions provided here, the algorithms and displays are not inherently related to any particular computer, virtual system or other equipment. Various general-purpose systems can also be used with the examples of the present invention. From the above description, the structure required to construct this type of system is obvious. In addition, the present invention is not directed to any specific programming language. It should be understood that various programming languages ​​can be used to implement the content of the present invention described herein, and the above description of a specific language is to disclose the best embodiment of the present invention.
[0059]In the instructions provided here, a lot of specific details are explained. However, it can be understood that the embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and technologies are not shown in detail, so as not to obscure the understanding of this specification.
[0060]It should be understood that in order to simplify the present disclosure and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or In its description. However, the disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly stated in each claim. More precisely, as reflected in the following claims, the inventive aspect lies in less than all the features of a single embodiment disclosed previously. Therefore, the claims following the specific embodiment are thus explicitly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present invention.
[0061]Those skilled in the art should understand that the modules or units or components of the device in the example disclosed herein can be arranged in the device as described in this embodiment, or alternatively can be positioned differently from the device in this example In one or more devices. The modules in the foregoing examples can be combined into one module or further divided into multiple sub-modules.
[0062]Those skilled in the art can understand that it is possible to adaptively change the modules in the device in the embodiment and set them in one or more devices different from the embodiment. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and/or processes or units are mutually exclusive, any combination can be used to compare all features disclosed in this specification (including the accompanying claims, abstract and drawings) and any method or methods disclosed in this manner or All the processes or units of the equipment are combined. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0063]The invention also includes:
[0064]A8. The method according to any one of A2-A7, wherein when the second sub-process detects that the test of the application in the application list is completed, sending a test completion message to the first main process includes :
[0065]When the second sub-process detects that the application in the application list has been tested, sending the test completion information to the first pipeline file;
[0066]The first main process obtains test completion information from the first pipeline file.
[0067]In addition, those skilled in the art can understand that although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments means that they are within the scope of the present invention. Within and form different embodiments. For example, in the following claims, any one of the claimed embodiments can be used in any combination.
[0068]In addition, some of the embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices that perform the described functions. Therefore, a processor with the necessary instructions for implementing the method or method element forms a device for implementing the method or method element. In addition, the elements described herein of the device embodiment are examples of a device for implementing the function performed by the element for the purpose of implementing the invention.
[0069]As used herein, unless otherwise specified, the use of ordinal numbers "first", "second", "third", etc. to describe ordinary objects merely refers to different instances of similar objects, and is not intended to imply such The described objects must have a given order in terms of time, space, order, or in any other way.
[0070]Although the present invention has been described in terms of a limited number of embodiments, benefiting from the above description, those skilled in the art understand that other embodiments can be envisaged within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is mainly selected for the purpose of readability and teaching, not for explaining or limiting the subject of the present invention. Therefore, without departing from the scope and spirit of the appended claims, many modifications and alterations are obvious to those of ordinary skill in the art. As for the scope of the present invention, the disclosure of the present invention is illustrative rather than restrictive, and the scope of the present invention is defined by the appended claims.
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Similar technology patents

Classification and recommendation of technical efficacy words

  • Wide range of applications
  • The testing process is simple
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products