An applet performance calibration method and device, electronic equipment and storage medium
By collecting videos of the mini-program running and calculating calibration values, the problem of large performance calibration errors in mini-programs was solved, enabling accurate performance testing and optimization, and improving the startup experience of mini-programs.
Patent Information
- Application Number
- CN202210200651.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-01
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-03-01
AI Technical Summary
Existing technologies make it difficult to accurately obtain the performance parameters of mini programs, resulting in large performance calibration errors and making it difficult to improve the startup experience of mini programs.
By collecting multiple running videos of the mini-program, the first effective drawing time of the markers, the actual first effective drawing time, and the pop-up creation time are obtained. The calibration value is then calculated to determine whether the mini-program's performance meets the requirements.
It enables accurate calibration of mini-program performance, reduces manual costs, improves testing efficiency, and identifies performance deficiencies through analysis for optimization, thereby enhancing the performance of mini-programs.
Smart Images

Figure CN114691495B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computers, and particularly relates to the technical field of cloud computing. BACKGROUND
[0002] With the continuous development of the applet, the use scenarios of the applet are increasingly rich, and the functions of the applet are increasingly complex. The performance of the applet needs to be continuously optimized to improve the start experience. However, the rendering modes of different applets are different, and it is difficult to accurately obtain the performance parameters of the applet in order to calibrate the applet. At present, the performance parameters of the applet can only be obtained by dotting the applet, but the actual error of the dotted parameters is large. SUMMARY
[0003] The present disclosure provides an applet performance calibration method and device, electronic equipment and storage medium.
[0004] According to an aspect of the present disclosure, an applet performance calibration method is provided, comprising:
[0005] collecting multiple running videos of an applet;
[0006] obtaining, from the multiple running videos, a dotted first valid rendering time, a real first valid rendering time and a pop-up window creation duration corresponding to each running video;
[0007] calculating a calibration value according to the dotted first valid rendering time, the real first valid rendering time and the pop-up window creation duration corresponding to the multiple running videos;
[0008] in response to the calibration value being less than or equal to a preset duration, determining that the calibration of the applet is passed.
[0009] According to another aspect of the present disclosure, an applet performance calibration device is provided, comprising:
[0010] a collection module configured to collect multiple running videos of an applet;
[0011] a processing module configured to obtain, from the multiple running videos, a dotted first valid rendering time, a real first valid rendering time and a pop-up window creation duration corresponding to each running video;
[0012] a calculation module configured to calculate a calibration value according to the dotted first valid rendering time, the real first valid rendering time and the pop-up window creation duration corresponding to the multiple running videos;
[0013] a calibration module configured to, in response to the calibration value being less than or equal to a preset duration, determine that the calibration of the applet is passed.
[0014] According to another aspect of the present disclosure, an electronic equipment is provided, comprising:
[0015] At least one processor; and
[0016] A memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform any of the methods described above.
[0018] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method described in any of the preceding claims.
[0019] According to another aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method described in any of the preceding claims.
[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0021] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0022] Figure 1 This is a flowchart illustrating the applet performance calibration method provided according to an embodiment of this disclosure;
[0023] Figure 2 This is a schematic diagram illustrating the acquisition of the first effective drawing time of the dot notation and the duration of pop-up creation, provided according to embodiments of this disclosure.
[0024] Figure 3 This is a schematic diagram illustrating the acquisition of the actual first effective drawing time according to an embodiment of this disclosure;
[0025] Figure 4 This is a schematic diagram of the structure of the applet performance calibration device provided according to an embodiment of this disclosure;
[0026] Figure 5 This is a block diagram of an electronic device used to implement the applet performance calibration method of the present disclosure embodiments. Detailed Implementation
[0027] Exemplary embodiments of the present disclosure are described herein below with reference to the accompanying drawings, in which various specific details are set forth to assist in a thorough understanding of these embodiments. It should be understood, however, that various changes and modifications can be made to the embodiments described herein, without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions can be omitted for clarity and conciseness.
[0028] In order to accurately determine whether the accuracy of the parameters of the performance of the applet obtained meets the requirements, so as to more accurately test the applet, as shown in Figure 1 An embodiment of the present disclosure provides an applet performance calibration method, which comprises the following steps:
[0029] Step 101: Collecting multiple running videos of the applet.
[0030] The multiple running videos of the applet are collected, and the running videos of the applet have corresponding first valid drawing time and pop-up creation duration. The first valid drawing time is the first valid drawing time obtained from the applet when it runs, and there is an error between the first valid drawing time and the real first valid drawing time.
[0031] Step 102: Obtaining the first valid drawing time, the real first valid drawing time and the pop-up creation duration corresponding to each running video from the multiple running videos.
[0032] As shown in Figure 2 The first valid drawing time and the pop-up creation duration corresponding to each running video are obtained from the pop-up in each running video, Figure 2 The black part in the figure is the pop-up, and the timestamp corresponding to FMP (first valid drawing) in the pop-up is the first valid drawing time, and the duration corresponding to pop (pop-up creation duration) is the pop-up creation duration.
[0033] As shown in Figure 3 Each running video is analyzed frame by frame to obtain the real first valid drawing time corresponding to each running video. The first frame when the scroll bar is filled to the longest can be found in each frame of image as the real first valid drawing frame, and the time corresponding to the frame is obtained as the real first valid drawing time, Figure 3 a, Figure 3 b and Figure 3 c are three consecutive frames of a certain applet running video, Figure 3 a is a frame of image with a timestamp of 1641974400, Figure 3 b is a frame of image with a timestamp of 1641974405, Figure 3 c is a frame of image with a timestamp of 1641974410, Figure 3 b andFigure 3 c is the frame image when the webpage is filled to the longest, that is, the scroll bar is the shortest, but Figure 3 b corresponds to the timestamp earlier than Figure 3 c, so Figure 3 b is the first frame image when the webpage is filled to the longest, that is, the scroll bar is the shortest, then Figure 3 b corresponds to the timestamp is the real first valid drawing time corresponding to the running video of the applet.
[0034] Step 103, according to the dotting first valid drawing time, the real first valid drawing time and the pop-up window creation duration corresponding to the plurality of running videos, calculate the calibration value.
[0035] Step 104, in response to the calibration value being less than or equal to the preset duration, determining that the applet calibration passes.
[0036] The preset duration is set to 10 milliseconds in this embodiment, which can be changed according to specific needs.
[0037] By collecting multiple running videos of the applet, multiple dotting first valid drawing times, real first valid drawing times and pop-up window creation durations when the applet runs multiple times can be obtained. According to the dotting first valid drawing time, the real first valid drawing time and the pop-up window creation duration corresponding to the plurality of running videos, the calibration value is calculated, and whether the calibration value is less than or equal to the preset duration is determined to determine whether the performance of the applet meets the requirements. The performance of the applet is determined by the calibration value, which can accurately determine whether the performance parameters of the applet meet the requirements, so that the applet can be tested more accurately.
[0038] In step 101, multiple running videos of the applet are collected, and in an implementable manner, the multiple running videos include:
[0039] Step 201, in response to the identification of the applet being a test identification, starting screen recording.
[0040] If the applet needs to be tested, the identification of the applet will be marked as a test identification. When the applet is running, it is determined whether the identification of the applet is a test identification. If the identification of the applet is a test identification, the screen recording is automatically started.
[0041] Step 202, acquiring the dotting first valid drawing time and starting to create a pop-up window and recording the start time of creating the pop-up window.
[0042] When the applet runs to the first valid drawing time, the applet is dotted to acquire the dotting first valid drawing time, and the creation of the pop-up window is started and the start time of creating the pop-up window is recorded.
[0043] Step 203, creating the pop-up window and recording the completion time of creating the pop-up window.
[0044] It takes a certain time to create the pop-up window, and the creation completion time is recorded when the creation of the pop-up window is completed.
[0045] In step 204, the pop-up window creation duration is calculated according to the start creation time of the pop-up window and the creation completion time.
[0046] The creation completion time is subtracted from the start creation time of the pop-up window to obtain the pop-up window creation duration.
[0047] In step 205, multiple running videos of the mini-program are recorded, the corresponding first valid drawing time is obtained, and the corresponding pop-up window creation duration is calculated.
[0048] By setting a test identifier for the mini-program, the client can accurately determine whether the currently running mini-program is a mini-program that needs to be tested, and multiple running videos can be automatically collected through script code, reducing labor costs and improving the efficiency of obtaining running videos of the mini-program.
[0049] In step 104, after the calibration value is calculated according to the first valid drawing time, the real first valid drawing time, and the pop-up window creation duration corresponding to the multiple running videos, in an embodiment, the method further includes:
[0050] In step 301, in response to the calibration value being greater than the preset duration, it is determined that the mini-program calibration fails.
[0051] If the calibration value is greater than the preset duration, the mini-program calibration fails.
[0052] In step 302, the mini-program is analyzed according to the calibration value to obtain an analysis result.
[0053] In step 303, the mini-program is optimized according to the analysis result.
[0054] Analyzing the mini-program according to the calibration value can effectively analyze the performance deficiencies of the mini-program, such as whether the code optimization is insufficient or the performance of the server corresponding to the mini-program is insufficient, resulting in slow loading of the mini-program, etc. Optimizing the mini-program according to the analysis result can effectively improve the performance of the mini-program.
[0055] In step 303, after the mini-program is optimized according to the analysis result, in an embodiment, the method further includes:
[0056] In step 401, multiple running videos of the mini-program are re-collected.
[0057] In step 402, the calibration value of the mini-program is calculated according to the re-collected multiple running videos.
[0058] After the optimization of the applet, the running videos of the applet running multiple times are collected by reusing the script code, and the calibration value is calculated, further reducing the labor cost and improving the efficiency of obtaining running videos.
[0059] In step 402, after calculating the calibration value of the applet according to the reacquired multiple running videos, in an implementable manner, it also includes:
[0060] Step 501, in response to the recalculated calibration value being greater than the preset duration, reanalyzing and optimizing the applet until the calibration value of the applet is less than or equal to the preset duration.
[0061] If the recalculated calibration value of the applet is greater than the preset duration, reanalyze and optimize the applet until the calibration value of the applet is less than or equal to the preset duration, automatically collect running videos and calculate the applet using script code, and reanalyze and optimize the applet every time the calculated calibration value does not meet the requirements, improving the stability of optimizing the performance of the applet, further reducing the labor cost, and improving the efficiency of obtaining running videos.
[0062] In step 103, the calibration value is calculated according to the first valid drawing time of the corresponding dot, the real first valid drawing time and the pop-up window creation duration of the multiple running videos, and in an implementable manner, it includes:
[0063] Step 601, calculate the first sub-calibration value according to the first valid drawing time of the corresponding dot and the real first valid drawing time of the multiple running videos.
[0064] Step 602, calculate the second sub-calibration value according to the pop-up window creation duration of the multiple running videos.
[0065] Step 603, calculate the calibration value according to the first sub-calibration value and the second sub-calibration value.
[0066] In step 601, the first sub-calibration value is calculated according to the first valid drawing time of the corresponding dot and the real first valid drawing time of the multiple running videos, and in an implementable manner, it includes:
[0067] Step 701, subtract the real first valid drawing time from the first valid drawing time of the corresponding dot of each running video and take the absolute value to obtain the first valid drawing time difference absolute value of the running video.
[0068] Subtract the real first valid drawing time from the first valid drawing time of the corresponding dot of each running video and take the absolute value to obtain the first valid drawing time difference absolute value of each applet running video;
[0069] The first valid drawing time difference absolute value Δ is calculated according to the following formulaFMP :
[0070] Δ FMP = |FMP t -FMP r |
[0071] wherein FMP t is the first valid drawing time of the hit, FMP r is the real first valid drawing time.
[0072] Step 702, average the absolute values of the first valid drawing time difference values of all running videos to obtain a first sub-calibration value.
[0073] Average the absolute values of the first valid drawing time difference values corresponding to all running videos to obtain a first sub-calibration value;
[0074] The first sub-calibration value AVG FMP :
[0075]
[0076] wherein Δ FMP-i is the absolute value of the first valid drawing time difference of the fth running video, and k is the total number of running videos.
[0077] In step 602, the second sub-calibration value is calculated according to the pop-up creation time lengths corresponding to multiple running videos, and in an implementable manner, it includes:
[0078] Step 801, average the pop-up creation time lengths corresponding to all running videos to obtain a second sub-calibration value.
[0079] Average the pop-up creation time lengths corresponding to all running videos to obtain a second sub-calibration value;
[0080] The second sub-calibration value AVG pop :
[0081]
[0082] wherein pop j is the pop-up creation time length of the jth running video.
[0083] In step 603, the calibration value is calculated according to the first sub-calibration value and the second sub-calibration value, and in an implementable manner, it includes:
[0084] Step 901, subtract the second sub-calibration value from the first sub-calibration value and take the absolute value to obtain the calibration value.
[0085] The calibration value CV is calculated according to the following formula:
[0086] CV = AVG FMP -AVG pop .
[0087] One embodiment of this disclosure provides a mini-program performance calibration device, such as... Figure 4 As shown, the device includes:
[0088] Acquisition module 10 is used to acquire multiple running videos of the mini-program;
[0089] Processing module 20 is used to obtain the first effective drawing time of the markers, the actual first effective drawing time, and the pop-up creation time for each running video from the plurality of running videos;
[0090] Calculation module 20 is used to calculate calibration values based on the first effective drawing time of the dots corresponding to multiple running videos, the actual first effective drawing time, and the pop-up creation time.
[0091] The calibration module 40 determines that the mini-program has passed calibration in response to the calibration value being less than or equal to a preset time.
[0092] The processing module 20 is also configured to start screen recording in response to the mini-program's identifier being a test identifier;
[0093] The acquisition module 10 is also used to acquire the first effective drawing time of the dot and start creating the pop-up window at the same time and record the start time of creating the pop-up window;
[0094] The acquisition module 10 is also used to create a pop-up window and record the creation completion time;
[0095] The calculation module 30 is also used to calculate the pop-up creation duration based on the start creation time and creation completion time;
[0096] The acquisition module 10 is also used to run the mini-program screen recording multiple times, obtain the first effective drawing time of the corresponding acquisition points, and calculate the corresponding pop-up creation time to obtain multiple running videos.
[0097] This also includes:
[0098] The calibration module 40 is also used to determine that the mini-program calibration fails in response to the calibration value being greater than a preset time.
[0099] Analysis module 50 is used to analyze the applet based on the calibration value and obtain analysis results;
[0100] The optimization module 60 is used to optimize the mini-program based on the analysis results.
[0101] The acquisition module 10 is also used to re-acquire multiple running videos of the mini-program;
[0102] The computing module 30 is further configured to calculate the calibration value of the applet according to the plurality of re-acquired running videos.
[0103] The calibration module 40 is further configured to, in response to the recalculated calibration value being greater than the preset time length, re-analyze and optimize the applet until the calibration value of the applet is less than or equal to the preset time length.
[0104] The computing module 30 is further configured to calculate a first sub-calibration value according to the corresponding first effective drawing time of the dot and the real first effective drawing time of the plurality of running videos.
[0105] The computing module 30 is further configured to calculate a second sub-calibration value according to the corresponding pop-up creation time length of the plurality of running videos.
[0106] The computing module 30 is further configured to calculate the calibration value according to the first sub-calibration value and the second sub-calibration value.
[0107] The computing module 30 is further configured to subtract the real first effective drawing time from the first effective drawing time of the dot corresponding to each running video and take the absolute value to obtain the first effective drawing time difference absolute value of the running video.
[0108] The computing module 30 is further configured to average the first effective drawing time difference absolute values of all running videos to obtain the first sub-calibration value.
[0109] The computing module 30 is further configured to average the pop-up creation time lengths corresponding to all running videos to obtain the second sub-calibration value.
[0110] The computing module 30 is further configured to subtract the second sub-calibration value from the first sub-calibration value and take the absolute value to obtain the calibration value.
[0111] In the technical solution of the present disclosure, the acquisition, storage and application of user personal information comply with relevant laws and regulations and do not violate public order and good customs.
[0112] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.
[0113] Figure 5A schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0114] like Figure 5 As shown, device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1002 or a computer program loaded from storage unit 1008 into random access memory (RAM) 1003. The RAM 1003 may also store various programs and data required for the operation of device 1000. The computing unit 1001, ROM 1002, and RAM 1003 are interconnected via bus 1004. Input / output (I / O) interface 1005 is also connected to bus 1004.
[0115] Multiple components in device 1000 are connected to I / O interface 1005, including: input unit 1006, such as keyboard, mouse, etc.; output unit 1007, such as various types of monitors, speakers, etc.; storage unit 1008, such as disk, optical disk, etc.; and communication unit 1009, such as network card, modem, wireless transceiver, etc. Communication unit 1009 allows device 1000 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0116] The computing unit 1001 can be various general purpose and / or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs various methods and processes described above, such as the applet performance calibration method. For example, in some embodiments, the applet performance calibration method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded onto the RAM 1003 and executed by the computing unit 1001, one or more steps of the applet performance calibration method described above can be performed. Alternatively, in other embodiments, the computing unit 1001 can be configured to perform the applet performance calibration method by any other suitable means, such as by means of firmware.
[0117] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0118] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / acts specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0119] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0120] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0121] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0122] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0123] It should be understood that the various forms of flow shown above can be used to reorder, add, or remove steps. For example, the steps described in the present disclosure can be performed in parallel, in series, or in a different order, without limitation herein, so long as the desired results of the technology described in the present disclosure are achieved.
[0124] The specific embodiments described above are not intended to be limiting, and persons skilled in the art will appreciate that various modifications, combinations, sub-combinations and alternatives can be made to the specific embodiments without departing from the spirit and scope of the disclosure. Any further modifications, equivalents and / or alternatives thereof are also intended to fall within the scope of the present disclosure.
Claims
1. A method for applet performance calibration, comprising: collecting a plurality of running videos of an applet; acquiring a first valid drawing time, a real first valid drawing time and a pop-up creation duration corresponding to each running video from the plurality of running videos, the first valid drawing time being a drawing time of the applet displayed in the running video, the real first valid drawing time being a time at which a longest scroll bar of the applet is filled in the running video, and the pop-up creation duration being obtained by subtracting a start time of creating a pop-up from an end time of creating the pop-up, the start time of creating the pop-up being obtained when the first valid drawing time is acquired and the pop-up is started to be created, and the end time of creating the pop-up being obtained when the pop-up is created and recorded; calculating a calibration value according to the first valid drawing time, the real first valid drawing time and the pop-up creation duration corresponding to the plurality of running videos; determining that the applet passes the calibration in response to the calibration value being less than or equal to a preset duration. 2.The method of claim 1, wherein the collecting a plurality of running videos of an applet comprises: starting to record a screen in response to an identification of the applet being a test identification; acquiring the first valid drawing time and starting to create the pop-up and recording a start time of creating the pop-up; creating the pop-up and recording an end time of creating the pop-up; calculating the pop-up creation duration according to the start time of creating the pop-up and the end time of creating the pop-up; running the applet multiple times to record the screen, acquire the first valid drawing time and calculate the pop-up creation duration, thereby obtaining the plurality of running videos. 3.The method of claim 1, further comprising: determining that the applet fails the calibration in response to the calibration value being greater than the preset duration; analyzing the applet according to the calibration value to obtain an analysis result; and optimizing the applet according to the analysis result. 4.The method of claim 3, further comprising: recollecting a plurality of running videos of the applet; calculating a calibration value of the applet according to the recollected plurality of running videos. 5.The method of claim 4, further comprising: reanalyzing and reoptimizing the applet until the calibration value of the applet is less than or equal to the preset duration in response to the recalculated calibration value being greater than the preset duration. 6.The method of claim 1, wherein the calculating a calibration value according to the first valid drawing time, the real first valid drawing time and the pop-up creation duration corresponding to the plurality of running videos comprises: calculating a first sub-calibration value according to the first valid drawing time and the real first valid drawing time corresponding to the plurality of running videos; calculating a second sub-calibration value according to the pop-up creation duration corresponding to the plurality of running videos; and calculating the calibration value according to the first sub-calibration value and the second sub-calibration value.
7. The method of claim 6, wherein the calculating the first sub-calibration value according to the first valid rendering time and the real first valid rendering time corresponding to the plurality of running videos comprises: subtracting the real first valid rendering time from the first valid rendering time corresponding to each running video and taking an absolute value to obtain a first valid rendering time difference absolute value of the running video; and averaging the first valid rendering time difference absolute values of all running videos to obtain the first sub-calibration value.
8. The method of claim 6, wherein the calculating the second sub-calibration value according to the pop-up creation time corresponding to the plurality of running videos comprises: averaging the pop-up creation times corresponding to all running videos to obtain the second sub-calibration value.
9. The method of claim 6, wherein the calculating the calibration value according to the first sub-calibration value and the second sub-calibration value comprises: subtracting the second sub-calibration value from the first sub-calibration value and taking an absolute value to obtain the calibration value.
10. An applet performance calibration apparatus, comprising: an acquisition module configured to acquire a plurality of running videos of an applet; a processing module configured to obtain, from the plurality of running videos, a first valid rendering time, a real first valid rendering time, and a pop-up creation time corresponding to each running video, the first valid rendering time being a rendering time of the applet displayed in the running video, the real first valid rendering time being a time at which a longest applet scroll bar is filled for the first time determined from the running video, and the pop-up creation time being obtained by subtracting a start time of creating a pop-up from a completion time of creating the pop-up, the start time of creating the pop-up being obtained when the first valid rendering time is obtained and the pop-up is started to be created and recorded, and the completion time of creating the pop-up being obtained when the pop-up is completed to be created and recorded; a calculation module configured to calculate a calibration value according to the first valid rendering time, the real first valid rendering time, and the pop-up creation time corresponding to the plurality of running videos; and a calibration module configured to determine that the applet passes the calibration in response to the calibration value being less than or equal to a preset time length.
11. The apparatus of claim 10, wherein the processing module is further configured to start recording a screen in response to an identifier of the applet being a test identifier; the acquisition module is further configured to obtain the first valid rendering time and start creating the pop-up and recording the start time of creating the pop-up; the acquisition module is further configured to complete creating the pop-up and recording the completion time of creating the pop-up; the calculation module is further configured to calculate the pop-up creation time according to the start time of creating the pop-up and the completion time of creating the pop-up; and the acquisition module is further configured to run the applet multiple times to record the screen, obtain the first valid rendering time, and calculate the pop-up creation time, thereby obtaining the plurality of running videos.
12. The apparatus of claim 10, further comprising: the calibration module is further configured to determine that the applet fails the calibration in response to the calibration value being greater than the preset time length; an analysis module configured to analyze the applet according to the calibration value to obtain an analysis result; and an optimization module configured to optimize the applet according to the analysis result.
13. The apparatus of claim 12, comprising: The collection module is further configured to re-collect the multiple running videos of the applet. The calculation module is further configured to calculate the calibration value of the applet according to the re-collected multiple running videos.
14. The apparatus of claim 13, comprising: The calibration module is further configured to re-analyze and optimize the applet until the calibration value of the applet is less than or equal to the preset time length, in response to the recalculated calibration value being greater than the preset time length.
15. The apparatus of claim 10, comprising: The calculation module is further configured to calculate a first sub-calibration value according to the first valid rendering time of the first dot and the real first valid rendering time corresponding to the multiple running videos; The calculation module is further configured to calculate a second sub-calibration value according to the pop-up creation time length corresponding to the multiple running videos; The calculation module is further configured to calculate the calibration value according to the first sub-calibration value and the second sub-calibration value.
16. The apparatus of claim 15, comprising: The calculation module is further configured to obtain the first valid rendering time difference absolute value of the running video by subtracting the real first valid rendering time from the first valid rendering time of the first dot corresponding to each running video and taking the absolute value; The calculation module is further configured to obtain the first sub-calibration value by averaging the first valid rendering time difference absolute values of all the running videos.
17. The apparatus of claim 15, comprising: The calculation module is further configured to obtain the second sub-calibration value by averaging the pop-up creation time lengths corresponding to all the running videos.
18. An electronic device, comprising: at least one processor; and a memory communicatively connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.
19. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-9.
20. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-9.
20. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-9.
Citation Information
Patent Citations
Method and device for detecting first screen time
CN108228463A
Application program start-up time consumption test method and device, and storage medium
CN108984395A