CN113282469A - Application performance detection method and system, storage medium and computing device - Google Patents

Application performance detection method and system, storage medium and computing device Download PDF

Info

Publication number
CN113282469A
CN113282469A CN202110481455.XA CN202110481455A CN113282469A CN 113282469 A CN113282469 A CN 113282469A CN 202110481455 A CN202110481455 A CN 202110481455A CN 113282469 A CN113282469 A CN 113282469A
Authority
CN
China
Prior art keywords
application program
application
execution
performance parameters
program
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
CN202110481455.XA
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.)
Perfect World Holding Group Ltd
Original Assignee
Perfect World Holding Group 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 Perfect World Holding Group Ltd filed Critical Perfect World Holding Group Ltd
Priority to CN202110481455.XA priority Critical patent/CN113282469A/en
Publication of CN113282469A publication Critical patent/CN113282469A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions

Landscapes

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

Abstract

The invention provides a method, a system, a storage medium and a computing device for detecting the performance of an application program, wherein the method comprises the following steps: responding to the starting operation of the application program to be detected, and synchronously starting the agent program which is configured in the application program in a parameter mode in advance; transmitting the proxied content into the application process of the application program in a parameter form by utilizing the started proxy program; and scanning the proxied content in the application process of the application program, and detecting the performance parameters of each execution method called by the application program to run the process related to the proxied content based on the scanning result. The embodiment of the invention can synchronously start the agent program when the application program to be detected is started, and does not need to add the starting parameter to the application program again, thereby avoiding the problem of failed starting or failed execution of the application program caused by the error of adding the starting parameter. In addition, the detection of the performance parameters of the application program is specific to each execution method, so that the performance of the application program can be detected in a finer granularity.

Description

Application performance detection method and system, storage medium and computing device
Technical Field
The invention relates to the technical field of data detection, in particular to a method, a system, a storage medium and a computing device for detecting the performance of an application program.
Background
In the process of developing the application program, along with more and more algorithms and more services of engineering departments related to the application program, a plurality of developers can play roles in part, so that careless mistakes are easy to occur on the codes, and even the algorithm complexity of more than n ^2 level can occur. For the existing situation that the response time is not in the attention range, the problems that the user cannot use the application program smoothly and the user experience is poor are necessarily caused. In the process of troubleshooting problems, the problem may not be found successfully due to continuous online log retry, which causes low manual efficiency.
Disclosure of Invention
In view of the above problems, the present invention is proposed to provide a method, a system, a storage medium, and a computing device for detecting performance of an application program, which overcome or at least partially solve the above problems, and can synchronously start an agent program when an application program to be detected starts, without adding a start parameter to the application program again to start the agent program, and avoid application program start failure or execution failure due to an error in adding the start parameter. The detection of the performance parameters of the application program is embodied to each execution method, so that the performance of the application program can be obtained through finer-grained detection.
According to an aspect of the embodiments of the present invention, a method for detecting performance of an application program is provided, including:
responding to the starting operation of an application program to be detected, and synchronously starting an agent program which is configured in the application program in a parameter mode in advance;
transmitting the proxied content into the application process of the application program in a parameter form by utilizing the started proxy program;
and scanning the proxied content in the application process of the application program, and detecting the performance parameters of each execution method called by the application program to run the process related to the proxied content based on the scanning result.
Optionally, the proxied content includes at least one of a proxied path, a project name, and a key code snippet.
Optionally, before scanning the proxied content in the application process of the application program, the method further includes:
setting the proxied content as scanned content, and respectively injecting scanning programs for scanning into execution methods of various scanned packet classes corresponding to the scanned content;
setting scanning contents to be excluded, wherein the scanning contents to be excluded comprise contents which do not appear for the first time in repetitive contents or manually set scanning contents to be excluded.
Optionally, scanning the proxied content in the application process of the application program, and detecting performance parameters of each execution method called by the application program to run the process related to the proxied content based on the scanning result, includes:
scanning proxied contents in an application process of the application program through a scanning program in an execution method of the injected scanned package class;
and respectively counting and recording the performance parameters of each execution method called by the agent content related process when the application program runs based on the scanning result.
Optionally, the performance parameters of the execution method include:
at least one of time consumption of executing the method, name of the method of executing the method, name of parent method of executing the method, entity class to which the executing method belongs, and incoming parameters.
Optionally, if the performance parameter of the execution method includes time consumed by executing the method, detecting, based on the scan result, a performance parameter of each execution method called by the application program to run the process related to the proxied content, where the detecting includes:
detecting the time point when each execution method called in the process related to the proxied content is operated by the application program and the execution is finished;
and calculating the time difference value between the time point of finishing the execution and the time point of starting the execution, and taking the time difference value as the consumed time of the corresponding execution method.
Optionally, after detecting, based on the scanning result, performance parameters of each execution method called by the application program running the process related to the proxy content, the method further includes:
caching the performance parameters of each execution method to a specified code queue;
and storing the performance parameters cached in the specified code queue into a preset storage object at specified time intervals.
Optionally, the periodically storing the performance parameter cached in the designated code queue into a preset storage object at a designated time interval includes:
storing the performance parameters cached in the designated code queue into a preset storage object at regular time intervals in a batch mode; or
And sequentially and regularly storing the performance parameters cached in the specified code queue to a preset storage object at specified time intervals.
Optionally, after the performance parameters cached in the designated code queue are stored into a preset storage object at a designated time interval, the method further includes:
performing visual display on the performance parameters of each execution method stored in the preset storage object in a link form;
wherein the performance parameter of the execution method is used as the node information of the link.
According to another aspect of the embodiments of the present invention, there is also provided a performance detection system for an application program, including:
the starting module is suitable for responding to the starting operation of the application program to be detected and synchronously starting the agent program which is configured in the application program in a parameter mode in advance;
the agent module is suitable for transmitting the proxied content into the application process of the application program in a parameter form by utilizing the started agent program;
and the detection module is suitable for scanning the proxied content in the application process of the application program and detecting the performance parameters of each execution method called by the application program to run the process related to the proxied content based on the scanning result.
According to yet another aspect of embodiments of the present invention, there is also provided a computer storage medium storing computer program code which, when run on a computing device, causes the computing device to execute the performance detection method of an application program of any of the above embodiments.
According to still another aspect of the embodiments of the present invention, there is also provided a computing device including: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform the method of performance detection of an application program of any of the embodiments above.
According to another aspect of embodiments of the present invention, there is also provided a computer storage medium storing computer program code which, when run on a computing device, causes the computing device to execute the performance detection method of an application program according to any of the above embodiments.
According to another aspect of the embodiments of the present invention, there is also provided a computing device, including: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform the method of performance detection of an application program as described in any of the embodiments above.
In the embodiment of the invention, when the application program to be detected is started, the agent program which is pre-configured in the application program in a parameter form can be synchronously started, then the content to be proxied is transmitted to the application process of the application program in the parameter form through the started agent program, finally the content to be proxied in the application process of the application program is scanned, and the performance parameters of each execution method called by the process related to the content to be proxied of the application program are detected based on the scanning result. Therefore, the agent program is configured in the application program in advance in a parameter mode, so that the agent program can be synchronously started when the application program to be detected is started, the agent program does not need to be started by adding the starting parameter to the application program again, and the problem of starting failure or execution failure of the application program caused by the error of adding the starting parameter is solved. In addition, the embodiment of the invention can detect the performance parameters of each execution method in the process related to the proxied content, namely the detection of the performance parameters of the application program is specific to each execution method, thereby obtaining the performance of the application program through more fine-grained detection.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow chart illustrating a method for detecting performance of an application according to an embodiment of the invention;
FIG. 2 is a diagram illustrating a performance detection process of an application according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a visualization interface displayed in a performance detection process of an application according to an embodiment of the invention;
FIG. 4 is a link diagram illustrating performance parameters of an execution method in an application according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a performance detection system for an application according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a performance detection system for an application according to another embodiment of the present invention;
FIG. 7 is a schematic diagram illustrating a performance detection system for an application according to a further embodiment of the present invention;
fig. 8 is a schematic structural diagram of a performance detection system of an application according to another embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In order to solve the above technical problem, an embodiment of the present invention provides a performance detection method for an application program. Fig. 1 is a flowchart illustrating a performance detection method for an application according to an embodiment of the present invention. Referring to fig. 1, the performance detection method of an application includes steps S102 to S106.
Step S102, responding to the starting operation of the application program to be detected, and synchronously starting the agent program which is configured in the application program in a parameter mode in advance.
In the embodiment of the present invention, an Agent (i.e., Agent) may be installed in the application to be detected in a plug-in manner. The Agent of the embodiment can be applied to a plurality of different applications to be detected. The application program to be detected may be a web application or a micro-service application, the application program may reside in a memory of the terminal device, a code corresponding to the application program is executed by receiving an external trigger request (such as an http request), and data after execution is returned, the application program may also be another program, and the implementation of the present invention is not particularly limited.
And step S104, transmitting the proxied content into the application process of the application program in a parameter mode by using the started proxy program.
Step S106, scanning the proxied content in the application process of the application program, and detecting the performance parameters of each execution method called by the application program to run the processes related to the proxied content based on the scanning result.
The embodiment of the invention configures the agent program in the application program in a parameter form in advance, so that the agent program can be synchronously started when the application program to be detected is started, the agent program does not need to be started by adding the starting parameter to the application program again, and the problem of starting failure or execution failure of the application program caused by the error of adding the starting parameter is avoided. In addition, the embodiment of the invention can detect the performance parameters of each execution method in the process related to the proxied content, namely the detection of the performance parameters of the application program is specific to each execution method, thereby obtaining the performance of the application program through more fine-grained detection.
In an embodiment of the present invention, the proxied content in step S104 above may include at least one of a proxied path, a project name, a key code snippet, and the like. Moreover, the proxied content can be specified in advance, and can be used as the content for subsequent scanning after the specification is finished. The proxied path may be a path of one class, or may be a path of all classes under the same package. In the embodiment of the invention, if fine-grained link tracking is to be realized, the appointed proxied path can be automatically and preferentially loaded by a system where an application program is located. Here, the proxied path specified in advance is passed in the form of parameters to the application process of the application program.
The item name may be used to subsequently distinguish between different items, for example, may be used to subsequently store the performance parameter or to subsequently display the performance parameter. In the embodiment of the invention, the process of the project at least comprises two characteristics, namely process naming and address naming, wherein the default process naming is named by the name of the project, and self-defined naming can be used, and the address naming can be named according to the name of the address of the computer where the application program is located. For example, a process of "login account" in an application includes process name (e.g., login account process) and name of the computer address (e.g., IP address 172.17.9.17) of the application. In addition, because the java path is composed of fully qualified class names, and the underlying classes are multiple, the code that we usually focus on is the code written by the developer, so that it can be specified which code paths are scanned, i.e. the key code fragments are specified.
Since the proxied content is specified in advance, before the proxied content in the application process of the scanning application program in step S106 is executed, the specified proxied content may also be set as the content to be scanned, and the scanning program for scanning may be injected in the execution method of each scanned packet class corresponding to the scanned content. The scanning program is an executable program, and the executable program of the execution method injected into the scanned packet class can scan the proxied content in the application process, such as scanning the proxied path.
In this embodiment, some entity classes are irrelevant or belong to repetitive cyclic contents, on one hand, the contents themselves consume little time, on the other hand, the information provided repeatedly has little value, and it is not necessary to monitor all the contents, so that the embodiments of the present invention can eliminate the contents by setting a mode of eliminating the scanned contents. In this embodiment, the scanned content to be excluded may be content that does not appear for the first time in the repetitive content, and if the same content appears in a subsequent continuous repetitive cycle after scanning one scanned content, the same content is the scanned content to be excluded, and repeated scanning detection may not be required at this time. Of course, the scanned contents to be excluded may also be set autonomously by manual according to the actual situation, for example, the irrelevant contents are manually set as the scanned contents to be excluded.
In an embodiment of the present invention, in the process of executing step S106 to scan the proxied content in the application process of the application program and detecting the performance parameter of each execution method called by the process related to the proxied content executed by the application program based on the scanning result, the proxied content in the application process of the application program may be scanned by the scanning program that has been previously injected into the execution method of the scanned package class. And then respectively counting and recording the performance parameters of each execution method called by the agent content related process when the application program runs based on the scanning result. In this embodiment, the performance parameters of the executing method may include at least one of the elapsed time to execute the method, the name of the method to execute the method, the name of the parent method to execute the method, the entity class to which the executing method belongs, incoming parameters, and the like.
The time consumed by the execution method of the embodiment of the invention can reflect the time required by the execution of each execution method. The method name of the execution method and the parent method name of the execution method can conveniently and clearly represent the calling relationship among the execution methods, and if the execution method a calls the execution method b, the execution method a is a parent execution method and has a corresponding parent execution method name.
Incoming parameters may be used to do unit tests to more quickly discover performance issues of the application. For example, the application program execution logic may be normal when the parameter is "1", but after a parameter value (for example, "2") is introduced, the application program executes other code due to a problem of a judgment condition in the process, and the normal logic cannot be executed, so that the problem of the application program can be found more quickly to some extent by introducing the parameter.
In the embodiment of the present invention, when detecting the time consumption of the application program for running each execution method called by the proxy content related process based on the scanning result, the time point when the application program runs each execution method called by the proxy content related process and the time point when the execution is completed may be detected first. And then calculating the time difference value between the time point of finishing the execution and the time point of starting the execution, thereby taking the time difference value as the consumed time of the corresponding execution method.
In this embodiment, when the scanner scans that the current path is consistent with the proxied path, codes for calculating time may be inserted into the beginning and the end of each execution method of the class, so as to detect a time point when the current execution method starts to execute and a time point when the execution is completed, and then calculate a time difference between the time point when the execution is completed and the time point when the execution is started, so as to calculate the time when the current execution method runs, that is, the time consumed by the current execution method to run. Whether the performance of the application program is better can be determined through the calculated consumption time of the execution method, and generally, the shorter the consumption time of each execution method of the application program is, the higher the efficiency is, and the better the performance is.
In an embodiment of the present invention, after detecting, based on the scan result, the performance parameter of each execution method that is called by the proxy content related process when the application runs, the detected performance parameter of each execution method may also be stored.
Specifically, the performance parameters of each execution method may be buffered in an assigned code queue, and then the performance parameters buffered in the assigned code queue may be stored in a preset storage object at regular time intervals. The embodiment of the invention can collect the performance parameters generated by calling each execution method by the application program, thereby caching the collected performance parameters to the specified code queue.
The embodiment of the timed storage at the specified time interval refers to the timed polling storage of the performance parameters cached in the specified code queue. For example, the designated code queue is polled once at an interval of 1 minute, and if the cached performance parameters exist in the designated code queue, the cached performance parameters may be stored in the preset storage object. The specific value of the designated time interval may be set according to actual requirements, and the embodiment of the present invention is not particularly limited. The preset storage object for storing the performance parameters in this embodiment may include a local file, a database, a remote index, and the like, that is, the data in the designated code queue may be periodically and periodically stored in a plurality of storage manners.
The embodiment of the invention can effectively avoid the influence of the performance parameter storage process on the normal performance of the application program by regularly storing the performance parameters cached in the designated code queue instead of storing the performance parameters in real time.
The embodiment of the present invention may include two ways of storing the performance parameters cached in the designated code queue into the preset storage object at the designated time interval.
Firstly, the performance parameters cached in the designated code queue are stored into a preset storage object at a designated time interval in a batch mode. For example, all performance parameters cached in a designated code queue may be stored to a preset storage object in one batch at regular time. Or dividing all the performance parameters cached in the designated code queue into other number of batches, for example, dividing all the performance parameters into 2 batches for timed storage.
And secondly, sequentially and regularly storing the performance parameters cached in the specified code queue to a preset storage object at specified time intervals. In this way, no matter how many performance parameters cached in the designated code queue are included, the performance parameters in the designated code queue can be sequentially stored in the preset storage object, that is, one performance parameter is stored at a time. Of course, in the process of sequentially storing the performance parameters into the preset storage object, the performance parameters may be sequentially stored in the order in which they are detected.
The embodiment of the invention can pre-specify a group of proxied contents for one application program, and when the group of proxied contents of the application program are respectively and sequentially transmitted into the process of the application program and respectively complete the performance detection of the application program, an ending mark can be added in the process, so that the performance detection process of the next application program can be started.
For example, a set of proxied content preset for application a includes a1, a2 and A3, and after application a and the proxy are started synchronously, proxied content a1 is first introduced into the application process of application a, so as to detect and obtain corresponding performance parameters. And then restarting the application program A, and transferring the proxy content A2 into an application process of the application program A and detecting the corresponding performance parameters. And restarting the application program a again, transmitting the proxied content a3 into the application process of the application program a, detecting to obtain the corresponding performance parameter, and adding an end identifier into the application process for the case that the application program a has no proxied content which can be transmitted. The performance detection process for the next application (e.g., application B) may begin when the end flag is detected. By starting the application program A circularly and sequentially transmitting a plurality of proxy contents, a plurality of performance parameter values of the same application program can be obtained, so that the optimal performance parameter value can be selected from the performance parameter values.
In order to conveniently identify the performance parameters detected by the same application program, the same application program identifier can be added to the performance parameters detected by the same application program, so that the performance parameters with the same application program identifier cached in the designated code queue can be periodically stored in the preset storage object as the same batch after the detected performance parameters are cached in the designated code queue. Of course, in order to conveniently search the performance parameters of different application programs from the storage object, the embodiment of the present invention may further store the performance parameters corresponding to different application program identifiers in different positions of the preset storage object, respectively.
After the performance parameters cached in the designated code queue are stored into the preset storage object at the designated time interval in a timing manner, the embodiment of the invention can also visually display the performance parameters in the preset storage object, so that technicians can know the performance of the application program in time conveniently, and the display of the performance parameters is described in detail later.
In order to more clearly embody the solution of the present invention, the overall process of detecting the performance of the application program is described with reference to the above embodiment and fig. 2.
Firstly, when an application program to be detected is started, an Agent which is configured in the application program in a parameter mode in advance is synchronously started.
Secondly, the proxy content is transmitted to the application process of the application program in a parameter form by utilizing the started proxy Agent. And setting the scanned content and the scanned content to be excluded in the environment variable of the application process, and injecting a scanning program for scanning into the execution method of each scanned packet class corresponding to the scanned content.
The embodiment of the invention can execute the operation of injecting the scanning program when the agent type agent-class is detected. Because the Agent uses the third-party open source dependence in the Agent process, the jar file which needs to be additionally corrected can be loaded into the application memory by using the system loader in advance.
Then, after the injection operation is completed, the proxied content in the application process is scanned through the scanning program, and the performance parameters of each execution method called by the application program to run the process related to the proxied content are detected based on the scanning result. If the access request accesses the link flowing through, the information of each link node in the current link can be detected based on the scanning result, and each link node information corresponds to the performance parameter of each execution method.
Then, the performance parameters of each execution method are buffered to a specified code queue (i.e. a memory queue), and a timed storage task is waited. The timed storage task can be synchronously triggered when the application program is started, and the storage task is executed once every specified time interval.
And further, when the timed storage task is executed, storing the performance parameters of each execution method in the designated code queue into a preset storage object in batch or in sequence.
And finally, displaying the performance parameters of the execution method stored in the preset storage object on a visual display interface in a link form.
By specifically detecting the performance parameters of the application program to each execution method of the application program, the performance of the application program can be obtained through finer-grained detection, and fine-grained link tracking of the performance parameters of the application program is realized.
In an embodiment of the present invention, for a single request or access of an application program, time consumed by each execution method called in the single request or access process may be summed to obtain time consumed by the single request or access, and the time consumed by different requests or accesses and corresponding request or access time points are shown in a form of a broken line graph, as shown in fig. 3, each broken line node represents a node requested or accessed individually, a vertical axis represents time consumed by the request or access, a horizontal axis represents time points generated by the request or access, and a link graph of the execution method corresponding to the corresponding node may be entered by clicking any node.
In this embodiment, a screening box of the execution method may also be displayed on the visual display interface, the execution method to be displayed may be screened out by selecting the type of the execution method in the screening box, and "all" displayed in the screening box of fig. 3 indicates that all the execution methods are displayed. In addition, the address location of the different application programs, such as the IP addresses of the computing devices (e.g., 172.17.9.17) of the different application programs, may also be displayed in the blank position of the line drawing display interface. In addition, different items of different applications can be displayed on the display interface to select monitoring detected items, such as the content of the items displayed on the left side of the line graph in fig. 3.
Furthermore, the method name, the execution time and the time consumption of the specific execution method called by the application program at present can be displayed on the visual display interface so as to clearly know the relevant information of the current execution method.
In the link map of the execution method, the performance parameter of each execution method can be used as the node information of the link, i.e. the performance parameter is used as the basic information of the link. Referring to fig. 4, the link diagram of the embodiment of the present invention is presented in a tree structure, and the connection lines between the nodes represent the mutual call relationship between the nodes. The execution method named as the HomeSearchController has no called parent execution method, so the execution method HomeSearchController is an entry method and is also an exit method. In addition, the execution method HomeSearchController is also a parent execution method of homesearchbussesslmpl. Of course, a method of the homesearchbusseincellpl class may also be used as a parent execution method to call different execution methods connected below the parent execution method, such as an execution method Message < init >0V, an execution method Message.
The link diagram of the embodiment of the present invention also shows the time consumed by each execution method, for example, the time consumed by the HomeSearchController is 281ms, the time consumed by the execution method Message < init >0V is 1ms, and so on. The performance parameters of each execution method are displayed in a link form visualization mode, and the link tracking effect of finer granularity on the performance of the application program is achieved.
Based on the same inventive concept, an embodiment of the present invention further provides a performance detection system for an application program, and fig. 5 illustrates a schematic structural diagram of the performance detection system for an application program according to an embodiment of the present invention. Referring to fig. 5, the performance detection system of the application includes a start module 510, an agent module 520, and a detection module 530.
The starting module 510 is adapted to respond to a starting operation of the application to be detected, and synchronously start an agent program configured in the application program in a parameter form in advance.
The agent module 520 is adapted to utilize the started agent program to transfer the proxied content into the application process of the application program in the form of parameters.
The detecting module 530 is adapted to scan the proxied content in the application process of the application program, and detect the performance parameter of each execution method called by the application program to run the process related to the proxied content based on the scanning result.
The embodiment of the invention configures the agent program in the application program in a parameter form in advance, so that the agent program can be synchronously started when the application program to be detected is started, the agent program does not need to be started by adding the starting parameter to the application program again, and the problem of starting failure or execution failure of the application program caused by the error of adding the starting parameter is avoided. In addition, the embodiment of the invention can detect the performance parameters of each execution method in the process related to the proxied content, namely the detection of the performance parameters of the application program is specific to each execution method, thereby obtaining the performance of the application program through more fine-grained detection.
In an embodiment of the invention, the proxied content comprises at least one of a proxied path, a project name and a key code fragment.
Referring to fig. 6, in an embodiment of the present invention, the performance detection system of the application program includes a setting module 540 in addition to the modules of the above embodiments.
The setting module 540 is adapted to set the proxied content as the scanned content before the detection module 530 scans the proxied content in the application process of the application program, and respectively inject the scanning program for scanning into the execution method of each scanned packet class corresponding to the scanned content; setting scanning contents to be excluded, wherein the scanning contents to be excluded comprise contents which do not appear for the first time in the repetitive contents or manually set scanning contents to be excluded.
In an embodiment of the present invention, the detecting module 530 is further adapted to scan the proxied content in the application process of the application program by injecting the scanning program in the execution method of the scanned packet class; and respectively counting and recording the performance parameters of each execution method called by the agent content related process when the application program runs based on the scanning result.
In an embodiment of the present invention, the performance parameters of the execution method include at least one of time consumed by the execution method, a name of the method of the execution method, a name of a parent method of the execution method, an entity class to which the execution method belongs, and incoming parameters.
In an embodiment of the present invention, the detecting module 530 is further adapted to, if the performance parameter of the executing method includes time consumed by the executing method, detect a time point when each executing method called in the process related to the proxy content is executed by the application program and a time point when the execution is completed; and calculating the time difference between the time point of finishing the execution and the time point of starting the execution, and taking the time difference as the consumed time of the corresponding execution method.
Referring to fig. 7, in an embodiment of the present invention, the performance detection system of the application program further includes a storage module 550 in addition to the modules of the above embodiments.
The storage module 550 is adapted to, after the detection module 530 detects, based on the scanning result, that the application program runs the performance parameter of each execution method called by the proxy content-related process, cache the performance parameter of each execution method in the designated code queue; and storing the performance parameters cached in the specified code queue into a preset storage object at specified time intervals.
In an embodiment of the present invention, the storage module 550 is adapted to store the performance parameters cached in the designated code queue into a preset storage object at a designated time interval in a batch manner; or sequentially storing the performance parameters cached in the specified code queue into a preset storage object at specified time intervals.
Referring to fig. 8, in an embodiment of the present invention, the performance detection system of the application program further includes a presentation module 560 in addition to the modules of the above embodiments.
The display module 560 is adapted to, after the detection module 530 detects, based on the scanning result, that the application program runs the performance parameter of each execution method called by the process related to the proxy content, visually display, in a link form, the performance parameter of each execution method stored in the preset storage object; wherein the performance parameter of the execution method is used as the node information of the link.
Based on the same inventive concept, the embodiment of the present invention further provides a computer storage medium, where computer program codes are stored, and when the computer program codes are run on a computing device, the computing device is caused to execute the performance detection method of the application program according to any of the above embodiments.
Based on the same inventive concept, an embodiment of the present invention further provides a computing device, including: a processor; a memory storing computer program code; the computer program code, when executed by a processor, causes a computing device to perform the method of performance detection of an application program of any of the embodiments above.
It is clear to those skilled in the art that the specific working processes of the above-described systems, devices, modules and units may refer to the corresponding processes in the foregoing method embodiments, and for the sake of brevity, further description is omitted here.
In addition, the functional units in the embodiments of the present invention may be physically independent of each other, two or more functional units may be integrated together, or all the functional units may be integrated in one processing unit. The integrated functional units may be implemented in the form of hardware, or in the form of software or firmware.
Those of ordinary skill in the art will understand that: the integrated functional units, if implemented in software and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computing device (e.g., a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention when the instructions are executed. And the aforementioned storage medium includes: u disk, removable hard disk, Read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disk, and other various media capable of storing program code.
Alternatively, all or part of the steps of implementing the foregoing method embodiments may be implemented by hardware (such as a computing device, e.g., a personal computer, a server, or a network device) associated with program instructions, which may be stored in a computer-readable storage medium, and when the program instructions are executed by a processor of the computing device, the computing device executes all or part of the steps of the method according to the embodiments of the present invention.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments can be modified or some or all of the technical features can be equivalently replaced within the spirit and principle of the present invention; such modifications or substitutions do not depart from the scope of the present invention.

Claims (12)

1. A performance detection method for an application program is characterized by comprising the following steps:
responding to the starting operation of an application program to be detected, and synchronously starting an agent program which is configured in the application program in a parameter mode in advance;
transmitting the proxied content into the application process of the application program in a parameter form by utilizing the started proxy program;
and scanning the proxied content in the application process of the application program, and detecting the performance parameters of each execution method called by the application program to run the process related to the proxied content based on the scanning result.
2. The method of claim 1, wherein the proxied content comprises at least one of a proxied path, a project name, and a key code snippet.
3. The method of claim 1, wherein prior to scanning the proxied content in the application process of the application, further comprising:
setting the proxied content as scanned content, and respectively injecting scanning programs for scanning into execution methods of various scanned packet classes corresponding to the scanned content;
setting scanning contents to be excluded, wherein the scanning contents to be excluded comprise contents which do not appear for the first time in repetitive contents or manually set scanning contents to be excluded.
4. The method of claim 3, wherein scanning the proxied content in the application process of the application program, and detecting performance parameters of each execution method called by the application program to run the process related to the proxied content based on the scanning result comprises:
scanning proxied contents in an application process of the application program through a scanning program in an execution method of the injected scanned package class;
and respectively counting and recording the performance parameters of each execution method called by the agent content related process when the application program runs based on the scanning result.
5. The method of claim 1, wherein the performance parameters of the executing method comprise:
at least one of time consumption of executing the method, name of the method of executing the method, name of parent method of executing the method, entity class to which the executing method belongs, and incoming parameters.
6. The method of claim 5, wherein detecting performance parameters of each execution method invoked by the application running the process associated with the proxied content based on the scan results if the performance parameters of the execution method include time-consuming execution of the method comprises:
detecting the time point when each execution method called in the process related to the proxied content is operated by the application program and the execution is finished;
and calculating the time difference value between the time point of finishing the execution and the time point of starting the execution, and taking the time difference value as the consumed time of the corresponding execution method.
7. The method of claim 1, wherein after detecting performance parameters of each execution method called by the application program to run the proxied content related process based on the scanning result, the method further comprises:
caching the performance parameters of each execution method to a specified code queue;
and storing the performance parameters cached in the specified code queue into a preset storage object at specified time intervals.
8. The method of claim 7, wherein the step of periodically storing the performance parameters buffered in the designated code queue into a preset storage object at designated time intervals comprises:
storing the performance parameters cached in the designated code queue into a preset storage object at regular time intervals in a batch mode; or
And sequentially and regularly storing the performance parameters cached in the specified code queue to a preset storage object at specified time intervals.
9. The method according to claim 7 or 8, wherein after the performance parameters buffered in the designated code queue are stored in a preset storage object at designated time intervals, the method further comprises:
performing visual display on the performance parameters of each execution method stored in the preset storage object in a link form;
wherein the performance parameter of the execution method is used as the node information of the link.
10. A performance detection system for an application, comprising:
the starting module is suitable for responding to the starting operation of the application program to be detected and synchronously starting the agent program which is configured in the application program in a parameter mode in advance;
the agent module is suitable for transmitting the proxied content into the application process of the application program in a parameter form by utilizing the started agent program;
and the detection module is suitable for scanning the proxied content in the application process of the application program and detecting the performance parameters of each execution method called by the application program to run the process related to the proxied content based on the scanning result.
11. A computer storage medium storing computer program code which, when run on a computing device, causes the computing device to perform a method of performance detection of an application program as claimed in any of claims 1 to 9.
12. A computing device, comprising: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform the method of performance detection of an application program of any of claims 1-9.
CN202110481455.XA 2021-04-30 2021-04-30 Application performance detection method and system, storage medium and computing device Pending CN113282469A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110481455.XA CN113282469A (en) 2021-04-30 2021-04-30 Application performance detection method and system, storage medium and computing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110481455.XA CN113282469A (en) 2021-04-30 2021-04-30 Application performance detection method and system, storage medium and computing device

Publications (1)

Publication Number Publication Date
CN113282469A true CN113282469A (en) 2021-08-20

Family

ID=77277876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110481455.XA Pending CN113282469A (en) 2021-04-30 2021-04-30 Application performance detection method and system, storage medium and computing device

Country Status (1)

Country Link
CN (1) CN113282469A (en)

Similar Documents

Publication Publication Date Title
US9369521B2 (en) Naming of distributed business transactions
CN103795580B (en) A kind of data monitoring method, system and relevant device
US7412626B2 (en) Method and system for intelligent and adaptive exception handling
CN106294094B (en) Test method, client, server and system of game server
US9384114B2 (en) Group server performance correction via actions to server subset
CN106888233B (en) Data updating system and method
US9847926B2 (en) Presenting application performance monitoring data in distributed computer systems
CN110147327B (en) Multi-granularity-based web automatic test management method
US11509677B2 (en) Automatically detecting vulnerability remediations and regressions
CN101610226A (en) A kind of method and system of plug-in download
US11310140B2 (en) Mitigating failure in request handling
CN103338243A (en) Method and system for updating cache data of Web node
CN111355622A (en) Container traffic monitoring method, system and computer readable storage medium
US8326913B2 (en) Method and system for service contract discovery
WO2019075845A1 (en) Construction method and device for link call relationship, computer device and storage medium
CN112737800A (en) Service node fault positioning method, call chain generation method and server
CN110932933A (en) Network condition monitoring method, computing device and computer storage medium
WO2016178661A1 (en) Determining idle testing periods
CN111694550A (en) Page display control method, device and system
CN109409948B (en) Transaction abnormity detection method, device, equipment and computer readable storage medium
CN112437148B (en) Service request processing method and device, service server and system
CN112671878B (en) Block chain information subscription method, device, server and storage medium
CN113282469A (en) Application performance detection method and system, storage medium and computing device
CN109495319B (en) Method, device and equipment for determining fault information of CDN node
CN108390770B (en) Information generation method and device and server

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