CN114490421A - Method, device, equipment and storage medium for detecting native rendering performance of application - Google Patents

Method, device, equipment and storage medium for detecting native rendering performance of application Download PDF

Info

Publication number
CN114490421A
CN114490421A CN202210153550.1A CN202210153550A CN114490421A CN 114490421 A CN114490421 A CN 114490421A CN 202210153550 A CN202210153550 A CN 202210153550A CN 114490421 A CN114490421 A CN 114490421A
Authority
CN
China
Prior art keywords
rendering
page
target
timestamp
application
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
CN202210153550.1A
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202210153550.1A priority Critical patent/CN114490421A/en
Publication of CN114490421A publication Critical patent/CN114490421A/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/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to the technical field of computers, in particular to the technical field of performance detection of application programs, and can be applied to a performance detection scene of page rendering. The specific implementation scheme is as follows: starting a target application; recording a starting time stamp of the target application; when the rendering mode of the target application is a native rendering mode, starting the native rendering mode to render a target page of the target application; recording a rendering time stamp of at least one rendering node of the target page; and taking the time difference between the starting timestamp and the rendering timestamp as a rendering performance index. According to the method, the difference value between the timestamps is used as the rendering performance index, so that the performance of the native rendering mode is accurately and objectively evaluated, and basic data is provided for further optimizing the opening speed of the target application.

Description

Method, device, equipment and storage medium for detecting native rendering performance of application
Technical Field
The disclosure relates to the technical field of computers, in particular to the technical field of performance detection of application programs, which can be applied to a performance detection scene of page rendering.
Background
With the continuous development of the existing small programs, the use scenes of the small programs are more and more abundant. Rendering of pages of applets typically includes a web view (webview) rendering mode and a native (naviview) rendering mode. However, the related art lacks a method capable of objectively evaluating the performance of the native rendering mode, and cannot accurately measure the effect of the native rendering mode.
Disclosure of Invention
The present disclosure provides a method, apparatus, device, and storage medium for detecting native rendering performance of an application.
According to a first aspect of the present disclosure, there is provided a method of detecting native rendering performance of an application, comprising:
starting a target application;
recording a starting time stamp of the target application;
when the rendering mode of the target application is a native rendering mode, starting the native rendering mode to render a target page of the target application;
recording a rendering time stamp of at least one rendering node of the target page;
and taking the time difference between the starting timestamp and the rendering timestamp as a rendering performance index.
According to a second aspect of the present disclosure, there is provided an apparatus to detect native rendering performance of an application, comprising:
the application starting module is used for starting the target application;
the first time recording module is used for recording a starting time stamp of the target application;
the page rendering module is used for starting a native rendering mode to render a target page of the target application when the rendering mode of the target application is the native rendering mode;
the second time recording module is used for recording the rendering time stamp of at least one rendering node of the target page;
and the index acquisition module is used for taking the time difference between the starting timestamp and the rendering timestamp as the rendering performance index.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of detecting native rendering performance of an application described above.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of detecting native rendering performance of an application described above.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of detecting native rendering performance of an application as described above.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
The technical scheme provided by the disclosure has the following beneficial effects:
according to the technical scheme, the method and the device for the native rendering mode of the target application can record a plurality of timestamps of the target application from starting to page rendering, and the difference value between the timestamps is used as a rendering performance index, so that the performance of the native rendering mode is accurately and objectively evaluated.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 illustrates a flowchart of a method of detecting native rendering performance of an application provided by an embodiment of the present disclosure;
FIG. 2 illustrates a flowchart of another method for detecting native rendering performance of an application provided by an embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating a page change of a target application according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating an apparatus for detecting native rendering performance of an application provided by an embodiment of the present disclosure;
FIG. 5 illustrates a schematic diagram of an apparatus for detecting native rendering performance of an application provided by an embodiment of the present disclosure;
FIG. 6 illustrates a schematic block diagram of an example electronic device that may be used to implement the methods of detecting native rendering performance of an application provided by embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
With the continuous development of the existing small programs, the use scenes of the small programs are more and more abundant. Rendering modes of pages of the applet generally include a web view (webview) rendering mode and a native (naiview) rendering mode, wherein the native rendering mode can be used by a low-end device or an in-vehicle system to achieve smoother page rendering, so as to improve rendering performance of the applet pages. However, the related art lacks a method capable of objectively evaluating the performance of the native rendering mode, and cannot accurately measure the effect of the native rendering mode.
The present disclosure provides a method, an apparatus, a device, and a storage medium for detecting native rendering performance of an application, which are directed to solving at least one of the above technical problems of the prior art.
Fig. 1 shows a flowchart of a method for detecting native rendering performance of an application according to an embodiment of the present disclosure, and as shown in fig. 1, the method may mainly include the following steps:
s110: the target application is launched.
In the disclosed embodiments, an application that needs to detect its native rendering performance is defined as the target application. It is understood that the target application may be deployed in the electronic device, and the target application is started and executed by the electronic device. Here, the target application may be an applet, which is an application program that needs to be run based on the host application.
S120: and recording the starting time stamp of the target application.
It should be noted that, when the target application is started, the start timestamp may be synchronously recorded. The start time stamp may indicate a point in time at which the electronic device starts the target application.
S130: and when the rendering mode of the target application is the native rendering mode, starting the native rendering mode to render the target page of the target application.
It is to be appreciated that the target application can have a native rendering mode and a web view rendering mode. The method and the device for rendering the target page of the target application can identify the rendering mode to be used by the target application, and render the target page of the target application in the corresponding rendering mode. The target page in the embodiment of the present disclosure is a page that is first displayed after the target application is started, and the target page may be a home page of the target application, or a detail page at a lower layer of the home page, and the like.
In this embodiment, the rendering mode information may be called from a running file of the target application, and when the native rendering identifier is identified in the rendering mode information, the rendering mode of the target application is determined to be the native rendering mode. Here, the rendering mode information may be added in an application file by a developer of the application. Optionally, when the native rendering identifier is identified in the rendering mode information, determining the rendering mode of the target application as the native rendering mode; when the native rendering identification is not recognized in the rendering mode information, determining the rendering mode of the target application as a web view mode.
S140: and recording the rendering time stamp of at least one rendering node of the target page.
The embodiment of the disclosure may define at least one rendering node in a rendering process of a target page, where the rendering node represents a specified event of the target page in a rendering process, and the rendering node may include an event that completes a rendering process of a first page content of the target page, and an event that a height of a page content rendered in the target page exceeds a screen height. When a rendering process reaches a rendering node, the timestamp may be recorded once. It is to be understood that the embodiments of the present disclosure define the timestamp recorded when the rendering process reaches the rendering node as the rendering timestamp.
Optionally, the rendering timestamp of at least one rendering node of the target page is recorded, a maximum container for containing all the content of the target page may be identified, and the rendering timestamp of at least one rendering node of the target page in the maximum container is recorded.
S150: and taking the time difference between the starting timestamp and the rendering timestamp as a rendering performance index.
It is to be understood that the rendering timestamp represents a point in time that is subsequent to the point in time represented by the start timestamp, and the rendering timestamp may be subtracted from the start timestamp to obtain a time difference. And taking the time difference as a rendering performance index, wherein the shorter the time difference is, the shorter the time taken for the rendering process of the target page to reach the rendering node is, and the better the native rendering performance of the target application is.
According to the method for detecting the native rendering performance of the application, provided by the embodiment of the disclosure, for the target application in the native rendering mode, a plurality of timestamps from the starting of the target application to the page rendering process can be recorded, and a difference value between the timestamps is used as a rendering performance index, so that the performance of the native rendering mode is accurately and objectively evaluated, and basic data is provided for further optimizing the opening speed of the target application.
Fig. 2 shows a flowchart of a method for detecting native rendering performance of an application according to an embodiment of the present disclosure, and as shown in fig. 2, the method may mainly include the following steps:
s210: the target application is launched.
In the disclosed embodiments, an application that needs to detect its native rendering performance is defined as the target application. It is understood that the target application may be deployed in the electronic device, and the target application is started and executed by the electronic device. Here, the target application may be an applet, which is an application program that needs to be run based on the host application.
S220: and recording the starting time stamp of the target application.
It should be noted that, when the target application is started, the start timestamp may be synchronously recorded. The start time stamp may indicate a point in time at which the electronic device starts the target application.
S230: and calling the rendering mode information from the running file of the target application.
S240: when the native rendering identifier is identified in the rendering mode information, determining the rendering mode of the target application as the native rendering mode.
In the present disclosure, the rendering mode information may be added in the application file by the developer of the application. For example, a "viewmode" parameter may be added to an application file of a target application, and the viewmode may be assigned as NA, which is a native rendering identifier. When the value of Viewmode is identified as NA, the rendering mode of the target application may be determined to be a native rendering mode. It is understood that the target application may have a native rendering mode and a web view rendering mode, and when the value of Viewmode is not NA, the rendering mode of the target application may be determined to be the web view rendering mode.
S250: when the rendering mode of the target application is the native rendering mode, the native rendering mode is started to render the target page of the target application.
The target page in the embodiment of the present disclosure is a page that is first displayed after the target application is started, and the target page may be a home page of the target application, or a detail page at a lower layer of the home page, and the like.
S260: a maximum container for containing all of the content of the target page is identified.
It will be appreciated that multiple nested containers may be required to present the target page, and that different containers may contain the corresponding page content in the target page. Here, the largest container of the plurality of nested containers may contain all of the contents of the target page.
Optionally, when the largest container for containing all the contents of the target page is identified, the present disclosure may identify a container with a preset identifier among a plurality of containers of the target page; and determining the container with the preset identification as the largest container for containing all the contents of the target page. Here, the maximum container per page of the target application may mount and set a CSS attribute per-root-node value, which may be a preset identifier; when a container of the target page on which "perf-root-node" is hung is identified, the container may be determined to be the largest container.
Optionally, in the embodiment of the present disclosure, a preset identifier may be marked for the maximum container of each page in the installation stage of the target application. For example, before launching the target application, an installation file for the target application may be received; installing the target application based on the installation file, and generating an operation file of the target application; in the running file, the maximum container of each page is marked with a preset identifier. Specifically, when the target application is installed based on the installation file, the running file of the target application may be locally generated; in the run file, the CSS property per-root-node is set for the maximum container mount of each page of the target application, so that the maximum container of the page is quickly identified in the subsequent steps.
S270: and recording the rendering time stamp of at least one rendering node of the target page in the maximum container.
The embodiment of the disclosure may define at least one rendering node in a rendering process of a target page, where the rendering node represents a specified event of the target page in a rendering process, and the rendering node may include an event that completes a rendering process of a first page content of the target page, and an event that a height of a page content rendered in the target page exceeds a screen height. When a rendering process reaches a rendering node, the timestamp may be recorded once. It is to be understood that the embodiments of the present disclosure define the timestamp recorded when the rendering process reaches the rendering node as the rendering timestamp.
Optionally, in the embodiment of the present disclosure, when recording the rendering timestamp of at least one rendering node of the target page in the maximum container, the rendering process of the target page in the maximum container may be monitored, and when completing the rendering process of the first page content of the target page, the first rendering timestamp may be recorded. The target page can contain a plurality of page contents, the rendering flow time of different page contents can be different, the page content which is rendered firstly is defined as the first page content, and when the rendering flow of the first page content is completed, the first rendering timestamp can be synchronously recorded. It is to be appreciated that the first timestamp can represent a point in time at which the electronic device completed the rendering process of the first page content of the target page of the rendering process.
Optionally, the embodiment of the disclosure may monitor the rendering process of the target page in the maximum container when recording the rendering timestamp of at least one rendering node of the target page in the maximum container, and record the second rendering timestamp when the height of the page content rendered in the target page exceeds the screen height. It can be understood that the page contents contained in the target page may not be displayed in the screen of the electronic device at the same time, and the page needs to be scrolled. That is, as the number of the page contents of the target page that are rendered increases, the height of the page contents of the target page also increases, and when the height of the page contents of the target page that completes the rendering process exceeds the screen height, it indicates that the page contents of the target page have been spread over the screen of the electronic device. And when the height of the page content which is rendered in the target page exceeds the height of the screen, synchronously recording a second rendering time stamp. It is to be appreciated that the second timestamp can be a point in time when the height of the page content of the target page rendered by the electronic device exceeds the screen height.
S280: and taking the time difference between the starting timestamp and the rendering timestamp as a rendering performance index.
Optionally, when the time difference between the starting timestamp and the rendering timestamp is used as the rendering performance index, the first time difference between the starting timestamp and the first rendering timestamp may be calculated, and the first time difference is used as the rendering performance index.
It is to be appreciated that the point in time represented by the first rendering timestamp is subsequent to the point in time represented by the start timestamp, and the start timestamp can be subtracted from the first rendering timestamp to yield a first time difference. And taking the first time difference as a rendering performance index, wherein the shorter the first time difference is, the shorter the time taken for completing the rendering process of the first page content of the target page is, and the better the native rendering performance of the target application is.
Optionally, when the time difference between the starting timestamp and the rendering timestamp is used as the rendering performance index, the embodiment of the present disclosure may calculate a second time difference between the starting timestamp and the second rendering timestamp, and use the second time difference as the rendering performance index.
It is to be appreciated that the point in time represented by the second rendering timestamp is subsequent to the point in time represented by the start timestamp, and the start timestamp can be subtracted from the second rendering timestamp to obtain a second time difference. And taking a second time difference as the rendering performance index, wherein the shorter the second time difference is, the shorter the time taken for the height of the page content of the target page to exceed the screen height is, and the better the native rendering performance of the target application is also shown.
Fig. 3 illustrates a schematic diagram of page change of a target application provided by an embodiment of the present disclosure, as shown in fig. 3. When the target application is started, starting to display the starting page of the target application shown in the sub-diagram 3a, wherein the starting timestamp can be recorded at the moment; then, rendering the target page of the target application is started, and a sub-diagram 3b shows a page state when the rendering process of the first page content of the target page of the rendering process is completed, and at this time, a first rendering timestamp may be recorded; then, the rendering of more page content of the target page is continued, and a sub-diagram 3c shows the page state when the height of the page content of the target page completing the rendering process exceeds the screen height, at which time the second rendering timestamp may be recorded. Calculating a first time difference between the starting time stamp and the first rendering time stamp, and taking the first time difference as a rendering performance index; and calculating a second time difference between the starting time stamp and the second rendering time stamp, and taking the second time difference as a rendering performance index.
Based on the same principle as the method for detecting the native rendering performance of the application, the embodiment of the present disclosure provides an apparatus for detecting the native rendering performance of the application, and fig. 4 illustrates a schematic diagram of the apparatus for detecting the native rendering performance of the application provided by the embodiment of the present disclosure. As shown in fig. 4, the apparatus 400 for detecting native rendering performance of an application includes an application starting module 410, a first time recording module 420, a page rendering module 430, a second time recording module 440, and an index obtaining module 450.
The application launch module 410 is used to launch the target application.
The first time recording module 420 is used for recording the starting time stamp of the target application.
The page rendering module 430 is configured to initiate the native rendering mode to render the target page of the target application when the rendering mode of the target application is the native rendering mode.
The second time recording module 440 is configured to record a rendering time stamp of at least one rendering node of the target page.
The index obtaining module 450 is configured to use a time difference between the starting timestamp and the rendering timestamp as a rendering performance index.
The device for detecting the native rendering performance of the application, provided by the embodiment of the disclosure, can record a plurality of timestamps from the start of the target application to the page rendering process for the target application in the native rendering mode, and use a difference value between the timestamps as a rendering performance index, so as to accurately and objectively evaluate the performance of the native rendering mode and provide basic data for further optimizing the opening speed of the target application.
In an embodiment of the present disclosure, the page rendering module 430 is configured to determine that the rendering mode of the target application is a native rendering mode by:
calling rendering mode information from an operating file of a target application;
when the native rendering identifier is identified in the rendering mode information, determining the rendering mode of the target application as the native rendering mode.
In this embodiment of the disclosure, when the second time recording module 440 is configured to record the rendering timestamp of at least one rendering node of the target page, specifically:
identifying a largest container for containing all content of the target page;
and recording the rendering time stamp of at least one rendering node of the target page in the maximum container.
In this disclosed embodiment, the second time recording module 440, when configured to identify the largest container for containing all contents of the target page, is specifically configured to:
identifying a container with a preset identifier in a plurality of containers of a target page;
and determining the container with the preset identification as the largest container for containing all the contents of the target page.
In this embodiment of the disclosure, when the second time recording module 440 is configured to record the rendering timestamp of at least one rendering node of the target page in the maximum container, specifically:
monitoring the rendering process of the target page in the maximum container;
and recording the first rendering time stamp when the rendering process of the first page content of the target page is completed.
In the embodiment of the present disclosure, when the index obtaining module 450 is configured to use a time difference between the starting timestamp and the rendering timestamp as the rendering performance index, specifically: and calculating a first time difference between the starting time stamp and the first rendering time stamp, and taking the first time difference as a rendering performance index.
In this embodiment of the disclosure, when the second time recording module 440 is configured to record the rendering timestamp of at least one rendering node of the target page in the maximum container, specifically:
monitoring the rendering process of the target page in the maximum container;
and recording a second rendering timestamp when the height of the rendered page content in the target page exceeds the screen height.
In the embodiment of the present disclosure, when the index obtaining module 450 is configured to use a time difference between the starting timestamp and the rendering timestamp as the rendering performance index, specifically: and calculating a second time difference between the starting time stamp and the second rendering time stamp, and taking the second time difference as a rendering performance index.
Based on the same principle as the method for detecting the native rendering performance of the application described above, the present disclosure provides another apparatus for detecting the native rendering performance of the application, fig. 5 shows a schematic diagram of the apparatus for detecting the native rendering performance of the application provided by the present disclosure, and as shown in fig. 5, an apparatus 500 for detecting the native rendering performance of the application includes an application starting module 510, a first time recording module 520, a page rendering module 530, a second time recording module 540, an index acquisition module 550, and an application installation module 560. The starting module 510, the first time recording module 520, the page rendering module 530, the second time recording module 540, and the index obtaining module 550 are respectively the same as the corresponding application starting module 410, the first time recording module 420, the page rendering module 430, the second time recording module 440, and the index obtaining module 450 in fig. 4 in function.
The application installation module 560 is configured to: receiving an installation file of a target application; installing the target application based on the installation file, and generating an operation file of the target application; in the running file, the maximum container of each page is marked with a preset identifier.
It is understood that the modules of the apparatus for detecting native rendering performance of an application in the embodiment of the present disclosure have functions of implementing the corresponding steps of the method for detecting native rendering performance of an application. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the apparatus for detecting native rendering performance of an application, reference may be made to the corresponding description of the method for detecting native rendering performance of an application, and details are not described herein again.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 6 illustrates a schematic block diagram of an example electronic device that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The calculation unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 601 performs the various methods and processes described above, such as a method of detecting native rendering performance of an application. For example, in some embodiments, the method of detecting native rendering performance of an application may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When a computer program is loaded into RAM 603 and executed by computing unit 601, one or more steps of the above-described method of detecting native rendering performance of an application may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured by any other suitable means (e.g., by means of firmware) to perform a method of detecting native rendering performance of an application.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may 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 a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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.
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 a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; 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.
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: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may 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 may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (20)

1. A method of detecting native rendering performance of an application, comprising:
starting the target application;
recording a starting time stamp of the target application;
when the rendering mode of the target application is a native rendering mode, starting the native rendering mode to render a target page of the target application;
recording a rendering time stamp of at least one rendering node of the target page;
and taking the time difference between the starting time stamp and the rendering time stamp as a rendering performance index.
2. The method of claim 1, wherein said recording a rendering timestamp of at least one rendering node of the target page comprises:
identifying a largest container for containing all of the content of the target page;
recording a rendering timestamp of the target page at least one rendering node in the largest container.
3. The method of claim 2, wherein the identifying a largest container for containing all of the content of the target page comprises:
identifying a container with a preset identifier in a plurality of containers of the target page;
and determining the container with the preset identification as a maximum container for containing all the contents of the target page.
4. The method of claim 3, further comprising, prior to the launching of the target application:
receiving an installation file of the target application;
installing the target application based on the installation file, and generating an operation file of the target application;
and marking the preset identification for the maximum container of each page in the running file.
5. The method of claim 2, wherein said recording a rendering timestamp of the target page at least one rendering node in the largest container comprises:
monitoring the rendering process of the target page in the maximum container;
and recording a first rendering time stamp when the rendering process of the first page content of the target page is completed.
6. The method of claim 5, wherein the calculating a time difference between the launch timestamp and the render timestamp, the time difference as a rendering performance indicator comprises: and calculating a first time difference between the starting time stamp and the first rendering time stamp, and taking the first time difference as a rendering performance index.
7. The method of claim 2, wherein said recording a rendering timestamp of the target page at least one rendering node in the largest container comprises:
monitoring the rendering process of the target page in the maximum container;
recording a second rendering timestamp when the height of the page content rendered in the target page exceeds the screen height.
8. The method of claim 7, wherein the calculating a time difference between the launch timestamp and the render timestamp, the time difference being a rendering performance indicator, comprises: and calculating a second time difference between the starting time stamp and the second rendering time stamp, and taking the second time difference as a rendering performance index.
9. The method of claim 1, wherein the rendering mode of the target application is determined to be a native rendering mode by:
calling rendering mode information from the running file of the target application;
when a native rendering identifier is identified in the rendering mode information, determining that the rendering mode of the target application is a native rendering mode.
10. An apparatus to detect native rendering performance of an application, comprising:
the application starting module is used for starting the target application;
the first time recording module is used for recording the starting time stamp of the target application;
the page rendering module is used for starting a native rendering mode to render a target page of the target application when the rendering mode of the target application is the native rendering mode;
the second time recording module is used for recording the rendering time stamp of at least one rendering node of the target page;
and the index acquisition module is used for taking the time difference between the starting timestamp and the rendering timestamp as a rendering performance index.
11. The apparatus according to claim 10, wherein the second time recording module, when configured to record the rendering timestamp of the at least one rendering node of the target page, is specifically configured to:
identifying a largest container for containing all of the content of the target page;
recording a rendering timestamp of the target page at least one rendering node in the largest container.
12. The apparatus according to claim 11, wherein the second time recording module, when configured to identify a largest container for containing all contents of the target page, is specifically configured to:
identifying a container with a preset identifier in a plurality of containers of the target page;
and determining the container with the preset identification as a maximum container for containing all the contents of the target page.
13. The apparatus of claim 12, further comprising an application installation module to:
receiving an installation file of the target application;
installing the target application based on the installation file, and generating an operation file of the target application;
and marking the preset identification for the maximum container of each page in the running file.
14. The apparatus according to claim 11, wherein the second time recording module, when configured to record the rendering timestamp of the target page at the at least one rendering node in the maximum container, is specifically configured to:
monitoring the rendering process of the target page in the maximum container;
and recording a first rendering time stamp when the rendering process of the first page content of the target page is completed.
15. The apparatus according to claim 14, wherein the index obtaining module, when being configured to calculate a time difference between the start timestamp and the rendering timestamp, and taking the time difference as a rendering performance index, is specifically configured to: and calculating a first time difference between the starting time stamp and the first rendering time stamp, and taking the first time difference as a rendering performance index.
16. The apparatus according to claim 11, wherein the second time recording module, when configured to record the rendering timestamp of the target page at the at least one rendering node in the maximum container, is specifically configured to:
monitoring the rendering process of the target page in the maximum container;
recording a second rendering timestamp when the height of the page content rendered in the target page exceeds the screen height.
17. The apparatus of claim 10, wherein the page rendering module is to determine the rendering mode of the target application as a native rendering mode by:
calling rendering mode information from the running file of the target application;
when a native rendering identifier is identified in the rendering mode information, determining that the rendering mode of the target application is a native rendering mode.
18. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable 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 for causing 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.
CN202210153550.1A 2022-02-18 2022-02-18 Method, device, equipment and storage medium for detecting native rendering performance of application Pending CN114490421A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210153550.1A CN114490421A (en) 2022-02-18 2022-02-18 Method, device, equipment and storage medium for detecting native rendering performance of application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210153550.1A CN114490421A (en) 2022-02-18 2022-02-18 Method, device, equipment and storage medium for detecting native rendering performance of application

Publications (1)

Publication Number Publication Date
CN114490421A true CN114490421A (en) 2022-05-13

Family

ID=81482042

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210153550.1A Pending CN114490421A (en) 2022-02-18 2022-02-18 Method, device, equipment and storage medium for detecting native rendering performance of application

Country Status (1)

Country Link
CN (1) CN114490421A (en)

Similar Documents

Publication Publication Date Title
CN112994980A (en) Time delay testing method and device, electronic equipment and storage medium
CN114417780B (en) State synchronization method and device, electronic equipment and storage medium
CN113205189B (en) Method for training prediction model, prediction method and device
CN115328736A (en) Probe deployment method, device, equipment and storage medium
CN114490421A (en) Method, device, equipment and storage medium for detecting native rendering performance of application
CN115391204A (en) Test method and device for automatic driving service, electronic equipment and storage medium
CN114861321A (en) Problem scene extraction method, device, equipment and medium for traffic flow simulation
CN115309730A (en) Data auditing method and device, electronic equipment and storage medium
CN115131315A (en) Image change detection method, device, equipment and storage medium
CN114564149A (en) Data storage method, device, equipment and storage medium
CN114138358A (en) Application program starting optimization method, device, equipment and storage medium
CN108415656B (en) Display control method, device, medium and electronic equipment in virtual scene
CN113901451A (en) Link detection method and device, electronic equipment and storage medium
CN117539719A (en) Application operation monitoring method, device, equipment and medium
CN117271289A (en) Webpage monitoring method, device, equipment and storage medium
CN117806764A (en) Data collection method, device, equipment and storage medium of user interface
CN117784763A (en) Message sending method and device, electronic equipment and storage medium
CN114399333A (en) Method, device, equipment and storage medium for detecting medium information releasing effect
CN116991737A (en) Software testing method, system, electronic equipment and storage medium
CN113961229A (en) Method for generating application program installation package and method for running application program
CN116225941A (en) Page detection method and device, electronic equipment and storage medium
CN116627853A (en) Storage space recovery method, training device, training equipment and training medium for model
CN113836291A (en) Data processing method, device, equipment and storage medium
CN116303098A (en) Application testing method and device, electronic equipment and storage medium
CN116527546A (en) Multi-scene network speed measuring method, device, equipment and medium based on browser

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