CN110895503B - Application performance monitoring method and client - Google Patents

Application performance monitoring method and client Download PDF

Info

Publication number
CN110895503B
CN110895503B CN201811062546.4A CN201811062546A CN110895503B CN 110895503 B CN110895503 B CN 110895503B CN 201811062546 A CN201811062546 A CN 201811062546A CN 110895503 B CN110895503 B CN 110895503B
Authority
CN
China
Prior art keywords
function
execution
log data
application
execution function
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.)
Active
Application number
CN201811062546.4A
Other languages
Chinese (zh)
Other versions
CN110895503A (en
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.)
Alibaba China Co Ltd
Original Assignee
Alibaba China 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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN201811062546.4A priority Critical patent/CN110895503B/en
Publication of CN110895503A publication Critical patent/CN110895503A/en
Application granted granted Critical
Publication of CN110895503B publication Critical patent/CN110895503B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

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 embodiment of the application discloses a performance monitoring method and a client of an application. Aiming at least one service applied to a specified operation scene, the method is provided with monitoring configuration information written in a class file associated with the service; the class file is generated by packing the service source codes of the service; the method comprises the following steps: when the application runs in a specified running scene, monitoring the function to be executed in the class file, and judging whether the function name of the monitored current executing function is matched with the starting function name or the ending function name contained in the monitoring configuration information; according to the judging result, determining a target execution function of the log data to be recorded from the class file, and recording the log data of the target execution function; the recorded log data is sent to the server so that the server determines performance monitoring data of the application from the log data. According to the technical scheme, the performance monitoring maintenance cost of the application can be reduced.

Description

Application performance monitoring method and client
Technical Field
The application relates to the technical field of internet, in particular to a performance monitoring method and a client of an application.
Background
For some applications (applications) with a large user volume, for example, a certain video playing Application, in a specific running scene of the video playing Application, multiple business teams often participate in the Application, and respectively integrate the respective developed businesses in the running scene. For example, a plurality of services are integrated in a full-screen playing scene of the video playing application, including a playing control service, a barrage service, an advertisement service, an interactive service, and the like. However, the business team developing these businesses typically focuses on the respective business iterations and does not focus on the performance of the video playback application in the entire operating scenario, such as memory occupancy and power consumption, which directly affect the user experience. In this case, in order to continuously improve the user experience, it is necessary to monitor and analyze the overall performance of a plurality of services of the video playing application in a certain operation scene, so as to find a service short board and correspondingly improve the overall performance of the application.
At present, the main processes of the prior art method are: aiming at a plurality of services applied in a certain operation scene, corresponding monitoring codes are respectively written in the service codes of the services. Thus, when the application runs, the monitoring code can be used for acquiring the performance monitoring data of the corresponding service, so that the overall performance of the application is monitored based on the acquired performance monitoring data.
However, according to the method in the prior art, since the monitoring code needs to be written in the service code, the coupling degree between the performance monitoring and the service development is high, so that the corresponding monitoring code needs to be continuously adjusted due to frequent iteration of the service code in the service development process, the monitoring maintenance cost is high, and the long-term performance monitoring of the application is inconvenient.
Disclosure of Invention
The embodiment of the application aims to provide a performance monitoring method and a client of an application, which can reduce the maintenance cost of performance monitoring of the application.
In order to achieve the above object, the embodiments of the present application further provide a method for monitoring performance of an application, where, for at least one service of the application in a specified operation scenario, monitoring configuration information written in a class file associated with the service is provided; the class file is generated by packing the service source codes of the service; the method comprises the following steps: when the application runs in the appointed running scene, monitoring the function to be executed in the class file, and judging whether the function name of the monitored current executing function is matched with the starting function name or the ending function name included in the monitoring configuration information; determining a target execution function of log data to be recorded from the class file according to a judging result, and recording the log data of the target execution function; and sending the recorded log data to a server so that the server determines the performance monitoring data of the application according to the log data.
To achieve the above object, embodiments of the present application provide a client, where the client includes a memory and a processor, where the memory is configured to store a computer program and monitor configuration information written in a class file associated with at least one service of an application in a specified operation scenario; the class file is generated by packing the service source codes of the service; the computer program, when executed by the processor, performs the steps of: when the application runs in the appointed running scene, monitoring the function to be executed in the class file, and judging whether the function name of the monitored current executing function is matched with the starting function name or the ending function name included in the monitoring configuration information; determining a target execution function of log data to be recorded from the class file according to a judging result, and recording the log data of the target execution function; and sending the recorded log data to a server so that the server determines the performance monitoring data of the application according to the log data.
From the above, in this application, an application may typically integrate at least one service in a specified operating scenario. Before an application runs in the specified running scene, it is generally necessary to perform packing processing on service source codes of the service, and generate a corresponding class file, so that a function to be executed included in the class file is executed when the application runs in the specified running scene. In order to monitor the running performance of the application in the specified running scene, monitoring configuration information can be written in the class file. When the application runs in the specified running scene, the function to be executed in the class file can be monitored, and whether the function name of the monitored current executing function is matched with the starting function name or the ending function name included in the monitoring configuration information can be judged. Then, according to the judging result, determining a target execution function of the log data to be recorded from the class file, and recording the log data of the target execution function. Finally, the recorded log data may be sent to a server, such that the server determines performance monitoring data of the application from the log data. Therefore, the written monitoring configuration information is basically separated from the service source code of the service, the coupling degree between the written monitoring configuration information and the service source code is low, corresponding monitoring configuration information is not required to be frequently adjusted due to frequent iteration of the service code in the service development process, the monitoring maintenance cost is reduced, and long-term performance monitoring of the application is facilitated.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a step diagram of a performance monitoring method applied in an embodiment of the present application;
FIG. 2 is a flow chart of a performance monitoring method applied in an embodiment of the present application;
fig. 3 is a schematic structural diagram of a client in an embodiment of the present application.
Detailed Description
In order to make the technical solutions in the present application better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
The embodiment of the application provides a performance monitoring method of an application, which can be applied to system architectures of a client and a server. The client may be, for example, a desktop computer, a tablet computer, a notebook computer, a smart phone, a digital assistant, a smart wearable device, a television with network access function, etc. The client can be provided with a communication module and can be in communication connection with a remote server to realize data transmission with the server.
In this embodiment, the server may be an electronic device having a data operation, a storage function, and a network interaction function; software running in the electronic device that supports data processing, storage, and network interactions may also be used. The number of servers is not particularly limited in the present embodiment. The server may be one server, several servers, or a server cluster formed by several servers.
The embodiment of the application provides a performance monitoring method of an application, which can be applied to the client. For at least one service of the application in a specified operation scene, the method can be provided with monitoring configuration information written in a class file associated with the service; the class file is generated by packing the service source codes of the service.
In this embodiment, the application may be an application installed on the client, for example, an application of a video playing class such as Tencel video, aiqi, search fox video, acfun, and the like. Accordingly, the specified running scenario may be a scenario in which the user is paying attention to in using the application. For example, the application of these video playing classes may be a playing scene, i.e. a scene from a user clicking a certain video in a certain playlist to the video starting to play, or may be a full-screen playing scene, etc.
In this embodiment, in a normal case, the application may integrate at least one service in the specified operation scenario. For example, the application of the video playing class can integrate playing control service, barrage service, advertisement service, interactive service and the like in a full-screen playing scene; in the open scene, a play security service, an advertisement service, a play control service and the like can be integrated.
In this embodiment, before the application runs in the specified running scenario, the service source codes of the services may be generally packaged to generate an installation package corresponding to the application. Thus, after the installation package of the application is installed on the client, the user can use the application on the client. Wherein, in the process of packaging the service source code of the service, the class file associated with the service can be generated. At this time, in order to monitor the performance of the application when the application is running in the specified running scenario, monitoring configuration information may be written in the generated class file. Therefore, the written monitoring configuration information is basically separated from the service source code of the service, and the coupling degree between the written monitoring configuration information and the service source code is low. The monitoring configuration information can be used for setting a starting position and an ending position of monitoring, specific content of monitoring and monitoring rules. The monitoring configuration information may specifically include a start function name and an end function name to be monitored, execution time of the monitored function, and overhead degree of a CPU and overhead degree of a memory when the function is executed, and may further include a specified monitoring rule. In the open scene, the start function name may be, for example, a function name of an execution function corresponding to when a user clicks a certain video in a certain playlist, and the end function name may be, for example, a function name of an execution function corresponding to when the video starts playing. The specified monitoring rule may be, for example, a monitoring rule for monitoring all functions to be executed in the class file, or a monitoring rule for monitoring all functions to be executed with specified identifiers in the class file. For example, if the application is a Tencentrated video, the specified identifier may be a logo like a character string "tengxun". Therefore, when a user uses the application on the client, the client can monitor the functions to be executed in the class files associated with each service according to the monitoring configuration information, and further monitor the running performance of the application.
Referring to fig. 1, the performance monitoring method of the application may include the following steps.
S11: when the application runs in the appointed running scene, monitoring the function to be executed in the class file, and judging whether the function name of the monitored current executing function is matched with the starting function name or the ending function name included in the monitoring configuration information.
In this embodiment, as shown in fig. 2, for at least one service of the application in the specified operation scenario, when the application is operated in the specified operation scenario, the client may monitor the function to be executed in each service-associated class file. Specifically, when the application runs in the specified running scenario, the client may monitor the function to be executed in each service-associated class file according to the specified monitoring rule written in the monitoring configuration information in the class file. For example, if the specified monitoring rule is to monitor all functions to be executed in the class file, when the application runs in the specified running scenario, the client may monitor all functions to be executed in the class file associated with each service respectively. If the specified monitoring rule is a function to be executed with a specified identifier in the monitoring class file, the client can monitor the function to be executed with the specified identifier in the class file associated with each service when the application runs in the specified running scene.
In this embodiment, as shown in fig. 2, in order to facilitate the subsequent determination of the target execution function requiring log data from the multiple to-be-executed functions in the class file, in the process of monitoring the to-be-executed functions in the class file associated with each service, the client may further determine whether the function name of the monitored current execution function matches with the start function name or the end function name included in the monitoring configuration information. In this way, it can be determined which functions to be executed in the class file need to be logged according to the determination result, so as to analyze the performance of the applications according to the logged log data. Specifically, in the process of monitoring the functions to be executed in the class file sequentially according to the execution sequence of the functions, whether the function name of the current execution function to be monitored is the same as the start function name or the end function name included in the monitoring configuration information can be judged in real time.
S13: and determining a target execution function of the log data to be recorded from the class file according to the judging result, and recording the log data of the target execution function.
In this embodiment, after determining whether the function name of the monitored currently executed function matches the start function name or the end function name included in the monitoring configuration information, the client may determine, according to the determination result, a target executed function of log data to be recorded from the class file. Specifically, as shown in fig. 2, in the case where the function name of the current execution function matches the start function name or the end function name, or in the case where the current execution function does not match the start function name or the end function name, and the current execution function is located between the execution function corresponding to the start function name and the execution function corresponding to the end function name, the current execution function may be used as the target execution function. In this way, the function to be executed, which is located between the execution function corresponding to the start function name and the execution function corresponding to the end function name, and the function whose function name is the start function name and the end function name in the class file can be used as the target execution function. For example, in the open scene, the function to be executed between the corresponding execution function when the user clicks a certain video in a certain playlist and the corresponding execution function when the video starts playing, and the function to be executed between the corresponding execution function when the user clicks a certain video in a certain playlist and the corresponding execution function when the video starts playing are used as target execution functions of log data to be recorded, so that the log data of the execution functions are recorded later, and the performance of the application in the open scene is analyzed according to the log data. In this way, since the start function names and end function names of the functions that are monitored are not changed in general when frequent iterations of the service source code of the service occur, no adjustment is required to the monitoring configuration information. Even if the initial function names or the end function names of the monitored functions are changed under special conditions, the initial function names or the end functions in the monitoring configuration information are only required to be correspondingly adjusted, so that the adjustment cost is low, the monitoring maintenance cost is high, and the long-term performance monitoring of the application can be conveniently carried out.
In this embodiment, after determining the target execution function to be logged from the class file, the client may further record the log data of the target execution function. The log data may specifically include a class name of a class where the target execution function is located, a function name of the target execution function, a thread number and a thread name corresponding to the target execution function, a time when the target execution function starts to execute, a time when execution ends, and the like. In this way, the execution time of the execution function in the application or the performance such as the spending degree of the CPU and the spending degree of the memory in the execution time can be analyzed according to the starting time and the result time corresponding to the same class name, function name, thread number and thread name in the recorded log data.
S15: and sending the recorded log data to a server so that the server determines the performance monitoring data of the application according to the log data.
In this embodiment, as shown in fig. 2, after recording log data of a target execution function in a class file associated with each service for at least one service of the application in the specified operation scenario, the client may send the recorded log data to the server through a remote connection established with the server, so that the server may determine performance monitoring data of the application according to the log data. Specifically, in a normal case, the log data may include an execution start time and an execution end time of the target execution function, so that the server may subtract the execution start time of the target execution function from the execution end time of the target execution function to obtain execution time consumption of the target execution function, and may use the execution time consumption of the target execution function as performance monitoring data of the application. So that the targeted service improvement can be performed for the service which is more time-consuming to execute or the execution function corresponding to the service. Furthermore, for a first execution function and a second execution function of the plurality of target execution functions, if the execution process of the first execution function is between the execution start time and the execution end time of the second execution function, the server may determine function call information of the first execution function to call the second execution function, and may use the function call information as performance monitoring data of the application. Wherein the first execution function and the second execution function may be two different execution functions of the plurality of target execution functions. Thus, by determining the function call information of one function to call another function, call level information of the function can be obtained so as to count own execution time consumption and total execution time consumption of each function. For example, the total execution time of the first execution function is 19 ms, the total execution time of the second execution function is 118 ms, since the execution of the first execution function is between the execution start time and the execution end time of the second execution function, the own execution time of the second execution function is 99 ms, that is, 118 ms minus 19 ms, and the execution time of the first execution function is 19 ms, since there is no execution of other functions between the execution start time and the execution end time of the first execution function.
In this embodiment, for at least one service of the application in the specified operation scenario, after recording log data of the target execution function in the class file associated with each service, the client may further store the recorded log data in a log queue. Wherein in the log queue, the log data may be bound with a function identifier for identifying a target execution function with which the log data is associated. Specifically, before the recorded log data is stored in the log queue, a function identifier for identifying a target execution function associated with the log data may be generated, so that the log data is bound with the corresponding function identifier. Then, log data bound with the function identifier can be sequentially stored in a log queue. In this way, the log data associated with the target execution function defined by the function identifier can be read from the log queue subsequently, so that a plurality of log data associated with the target execution function to be analyzed can be read out sequentially and quickly through the function identifier, and the read log data are sent to the server, so that the server can determine the execution condition of the target execution function according to the log data, and further analysis of the performance monitoring data of the application is facilitated.
In this embodiment, in an actual application, during the process of recording log data of each target execution function or during the process of sending the log data to the server, a recording data omission or a transmission data omission may occur due to an abnormal application exit or the like, and at this time, the log data of a certain target execution function received by the server may only include an execution start time or an execution end time of the target execution function, so that the server cannot determine execution time consumption of the target execution function or other performance monitoring data, thereby affecting analysis of the performance monitoring data of the application. In order to avoid the influence on the analysis of the performance monitoring data of the application, after receiving the log data sent by the client, the server may pre-process the log data, filter out the log data with problems, and then determine the performance monitoring data of the application according to the pre-processed log data. Specifically, after receiving the log data sent by the client, the server may determine whether the log data of the target execution function includes an execution start time and an execution end time of the target execution function. If so, performance monitoring data for the application may be determined from the log data. And if the data is not included, the performance monitoring data of the application is not determined according to the log data.
In this embodiment, the functions implemented in the above-described method steps may be implemented by a computer program, which may be stored in a computer storage medium. In particular, the computer storage medium may be coupled to a processor, which may thereby read a computer program in the computer storage medium. The computer storage medium may be used for storing monitoring configuration information written in a class file associated with at least one service of an application in a specified operation scenario; the class file is generated by packing the service source codes of the service. The computer program, when executed by a processor, may implement the steps of:
s11: when the application runs in the appointed running scene, monitoring the function to be executed in the class file, and judging whether the function name of the monitored current executing function is matched with the starting function name or the ending function name included in the monitoring configuration information;
s13: determining a target execution function of log data to be recorded from the class file according to a judging result, and recording the log data of the target execution function;
S15: and sending the recorded log data to a server so that the server determines the performance monitoring data of the application according to the log data.
In one embodiment, the computer program, when executed by the processor, determines an objective execution function for logging data to be recorded comprising the steps of:
and under the condition that the function name of the current execution function is matched with the starting function name or the ending function name, or under the condition that the current execution function is not matched with the starting function name or the ending function name and the current execution function is positioned between the execution function corresponding to the starting function name and the execution function corresponding to the ending function name, taking the current execution function as the target execution function.
In one embodiment, the monitoring configuration information further includes a specified monitoring rule; the computer program, when executed by the processor, further performs the steps of:
and when the application runs in the appointed running scene, monitoring the function to be executed, which accords with the appointed monitoring rule, in the class file.
In one embodiment, the recorded log data of the target execution function is stored in a log queue; wherein, in the log queue, the log data is bound with a function identifier for identifying a target execution function associated with the log data; the computer program, when executed by the processor, further performs the steps of:
Reading log data associated with the target execution function defined by the function identifier from the log queue;
correspondingly, the read log data is sent to a server, so that the server determines the performance monitoring data of the application according to the log data.
In one embodiment, the log data includes an execution start time and an execution end time of the target execution function; the computer program, when executed by the processor, further performs the steps of:
subtracting the execution starting time of the target execution function from the execution ending time of the target execution function to obtain the execution time consumption of the target execution function;
and taking the time consumption of the execution of the target execution function as the performance monitoring data of the application.
In one embodiment, a plurality of the target execution functions are included in the class file associated with the service; the log data comprises the execution starting time and the execution ending time of the target execution function; the computer program, when executed by the processor, further performs the steps of:
determining function call information of the first execution function for calling the second execution function according to a first execution function and a second execution function in the target execution functions if the execution process of the first execution function is between the execution starting time and the execution ending time of the second execution function;
And taking the function call information as the performance monitoring data of the application.
In one embodiment, the computer program when executed by the processor further performs the steps of:
judging whether the log data of the target execution function comprises the execution starting time and the execution ending time of the target execution function or not; and if so, determining the performance monitoring data of the application according to the log data.
It should be noted that, the functions that can be implemented by the computer program in the computer storage medium may refer to the foregoing method implementation manner, and the technical effects that are implemented by the foregoing method implementation manner are similar to those that are implemented by the foregoing method implementation manner, and will not be repeated here.
Referring to fig. 3, the present application further provides a client. The client comprises a memory and a processor, wherein the memory can be used for storing a computer program and monitoring configuration information written in a class file associated with at least one service of an application in a specified operation scene; the class file is generated by packing the service source codes of the service; the computer program, when executed by the processor, performs the steps of:
S11: when the application runs in the appointed running scene, monitoring the function to be executed in the class file, and judging whether the function name of the monitored current executing function is matched with the starting function name or the ending function name included in the monitoring configuration information;
s13: determining a target execution function of log data to be recorded from the class file according to a judging result, and recording the log data of the target execution function;
s15: and sending the recorded log data to a server so that the server determines the performance monitoring data of the application according to the log data.
In this embodiment, the memory may include physical means for storing information, typically by digitizing the information and then storing the information in a medium using electrical, magnetic, or optical methods. The memory according to the present embodiment may further include: means for storing information by means of electrical energy, such as RAM, ROM, etc.; devices for storing information by magnetic energy, such as hard disk, floppy disk, magnetic tape, magnetic core memory, bubble memory, and USB flash disk; devices for storing information optically, such as CDs or DVDs. Of course, there are other ways of storing, such as quantum storing, graphene storing, etc.
In this embodiment, the processor may be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or processor, and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), a programmable logic controller, and an embedded microcontroller, among others.
In one embodiment, the computer program, when executed by the processor, determines an objective execution function for logging data to be recorded comprising the steps of:
and under the condition that the function name of the current execution function is matched with the starting function name or the ending function name, or under the condition that the current execution function is not matched with the starting function name or the ending function name and the current execution function is positioned between the execution function corresponding to the starting function name and the execution function corresponding to the ending function name, taking the current execution function as the target execution function.
In one embodiment, the monitoring configuration information further includes a specified monitoring rule; the computer program, when executed by the processor, further performs the steps of:
And when the application runs in the appointed running scene, monitoring the function to be executed, which accords with the appointed monitoring rule, in the class file.
In one embodiment, the recorded log data of the target execution function is stored in a log queue; wherein, in the log queue, the log data is bound with a function identifier for identifying a target execution function associated with the log data; the computer program, when executed by the processor, further performs the steps of:
reading log data associated with the target execution function defined by the function identifier from the log queue;
correspondingly, the read log data is sent to a server, so that the server determines the performance monitoring data of the application according to the log data.
In one embodiment, the log data includes an execution start time and an execution end time of the target execution function; the computer program, when executed by the processor, further performs the steps of:
subtracting the execution starting time of the target execution function from the execution ending time of the target execution function to obtain the execution time consumption of the target execution function;
And taking the time consumption of the execution of the target execution function as the performance monitoring data of the application.
In one embodiment, a plurality of the target execution functions are included in the class file associated with the service; the log data comprises the execution starting time and the execution ending time of the target execution function; the computer program, when executed by the processor, further performs the steps of:
determining function call information of the first execution function for calling the second execution function according to a first execution function and a second execution function in the target execution functions if the execution process of the first execution function is between the execution starting time and the execution ending time of the second execution function;
and taking the function call information as the performance monitoring data of the application.
In one embodiment, the computer program when executed by the processor further performs the steps of:
judging whether the log data of the target execution function comprises the execution starting time and the execution ending time of the target execution function or not; and if so, determining the performance monitoring data of the application according to the log data.
The specific functions implemented by the memory and the processor of the client provided in the embodiments of the present disclosure may be explained in comparison with the foregoing embodiments in the present disclosure, and may achieve the technical effects of the foregoing embodiments, which will not be repeated herein.
From the above, in this application, an application may typically integrate at least one service in a specified operating scenario. Before an application runs in the specified running scene, it is generally necessary to perform packing processing on service source codes of the service, and generate a corresponding class file, so that a function to be executed included in the class file is executed when the application runs in the specified running scene. In order to monitor the running performance of the application in the specified running scene, monitoring configuration information can be written in the class file. When the application runs in the specified running scene, the function to be executed in the class file can be monitored, and whether the function name of the monitored current executing function is matched with the starting function name or the ending function name included in the monitoring configuration information can be judged. Then, according to the judging result, determining a target execution function of the log data to be recorded from the class file, and recording the log data of the target execution function. Finally, the recorded log data may be sent to a server, such that the server determines performance monitoring data of the application from the log data. Therefore, the written monitoring configuration information is basically separated from the service source code of the service, the coupling degree between the written monitoring configuration information and the service source code is low, corresponding monitoring configuration information is not required to be frequently adjusted due to frequent iteration of the service code in the service development process, the monitoring maintenance cost is reduced, and long-term performance monitoring of the application is facilitated.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
Those skilled in the art will also appreciate that, in addition to implementing clients, servers in the form of pure computer readable program code, it is well possible to implement the same functions by logically programming method steps such that clients, servers are implemented in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, and the like. Such clients, servers may therefore be considered as a hardware component, and the means included therein for performing various functions may also be considered as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
From the above description of embodiments, it will be apparent to those skilled in the art that the present application may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in the embodiments or some parts of the embodiments of the present application.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are referred to each other, and each embodiment is mainly described as different from other embodiments. In particular, for embodiments of computer storage media, servers, and clients, reference may be made to the description of embodiments of the foregoing methods for comparison explanation.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
Although the present application has been described by way of embodiments, those of ordinary skill in the art will recognize that there are many variations and modifications of the present application without departing from the spirit of the present application, and it is intended that the appended claims encompass such variations and modifications without departing from the spirit of the present application.

Claims (14)

1. A method for monitoring performance of an application, wherein for at least one service of the application in a specified operating scenario, the method comprises:
when the application runs in the appointed running scene, monitoring the function to be executed in the class file, and judging whether the function name of the monitored current executing function is matched with the starting function name or the ending function name contained in the monitoring configuration information;
determining a target execution function of log data to be recorded from the class file according to a judging result, and recording the log data of the target execution function;
transmitting the recorded log data to a server, so that the server determines performance monitoring data of the application according to the log data;
wherein before the application runs in the specified running scenario, further comprising:
in the process of packaging service source codes of all services, monitoring configuration information is written in a generated class file associated with the services, an installation package corresponding to the application is generated, and the installation package is installed on a client for use, so that the written monitoring configuration information is separated from the service source codes of the services, wherein the monitoring configuration information comprises the following components: the method comprises the steps of starting function name and ending function name to be monitored, execution time of the monitored function, CPU overhead degree and memory overhead degree when the function is executed.
2. The method of claim 1, wherein determining the target execution function for the log data to be logged comprises:
and under the condition that the function name of the current execution function is matched with the starting function name or the ending function name, or under the condition that the current execution function is not matched with the starting function name or the ending function name and the current execution function is positioned between the execution function corresponding to the starting function name and the execution function corresponding to the ending function name, taking the current execution function as the target execution function.
3. The method of claim 1, wherein the monitoring configuration information further includes a specified monitoring rule;
correspondingly, when the application runs in the appointed running scene, monitoring the function to be executed, which accords with the appointed monitoring rule, in the class file.
4. The method of claim 1, wherein the recorded log data of the target execution function is stored in a log queue; wherein, in the log queue, the log data is bound with a function identifier for identifying a target execution function associated with the log data; after logging the log data of the target execution function, the method further comprises:
Reading log data associated with the target execution function defined by the function identifier from the log queue;
correspondingly, the read log data is sent to a server, so that the server determines the performance monitoring data of the application according to the log data.
5. The method according to claim 1, wherein the log data includes an execution start time and an execution end time of the target execution function; determining performance monitoring data of the application according to the log data, wherein the performance monitoring data comprises:
subtracting the execution starting time of the target execution function from the execution ending time of the target execution function to obtain the execution time consumption of the target execution function;
and taking the time consumption of the execution of the target execution function as the performance monitoring data of the application.
6. The method of claim 1, wherein a plurality of said target execution functions are included in said business-associated class file; the log data comprises the execution starting time and the execution ending time of the target execution function; determining performance monitoring data of the application according to the log data, and further comprising:
Determining function call information of the first execution function for calling the second execution function according to a first execution function and a second execution function in the target execution functions if the execution process of the first execution function is between the execution starting time and the execution ending time of the second execution function;
and taking the function call information as the performance monitoring data of the application.
7. The method of claim 1, wherein determining performance monitoring data for the application from the log data further comprises:
judging whether the log data of the target execution function comprises the execution starting time and the execution ending time of the target execution function or not; and if so, determining the performance monitoring data of the application according to the log data.
8. A client comprising a memory and a processor, the memory for storing a computer program and at least one service for an application in a specified operating scenario; the computer program, when executed by the processor, performs the steps of:
when the application runs in the appointed running scene, monitoring the function to be executed in the class file, and judging whether the function name of the monitored current executing function is matched with the starting function name or the ending function name contained in the monitoring configuration information;
Determining a target execution function of log data to be recorded from the class file according to a judging result, and recording the log data of the target execution function;
transmitting the recorded log data to a server, so that the server determines performance monitoring data of the application according to the log data;
wherein before the application runs in the specified running scenario, further comprising:
in the process of packaging service source codes of all services, monitoring configuration information is written in a generated class file associated with the services, an installation package corresponding to the application is generated, and the installation package is installed on a client for use, so that the written monitoring configuration information is separated from the service source codes of the services, wherein the monitoring configuration information comprises the following components: the method comprises the steps of starting function name and ending function name to be monitored, execution time of the monitored function, CPU overhead degree and memory overhead degree when the function is executed.
9. The client of claim 8, wherein the computer program, when executed by the processor, determines an objective execution function for logging data to be recorded comprising the steps of:
And under the condition that the function name of the current execution function is matched with the starting function name or the ending function name, or under the condition that the current execution function is not matched with the starting function name or the ending function name and the current execution function is positioned between the execution function corresponding to the starting function name and the execution function corresponding to the ending function name, taking the current execution function as the target execution function.
10. The client according to claim 8, wherein the monitoring configuration information further includes a specified monitoring rule; the computer program, when executed by the processor, further performs the steps of:
and when the application runs in the appointed running scene, monitoring the function to be executed, which accords with the appointed monitoring rule, in the class file.
11. The client of claim 8, wherein the recorded log data of the target execution function is stored in a log queue; wherein, in the log queue, the log data is bound with a function identifier for identifying a target execution function associated with the log data; the computer program, when executed by the processor, further performs the steps of:
Reading log data associated with the target execution function defined by the function identifier from the log queue;
correspondingly, the read log data is sent to a server, so that the server determines the performance monitoring data of the application according to the log data.
12. The client according to claim 8, wherein the log data includes an execution start time and an execution end time of the target execution function; the computer program, when executed by the processor, further performs the steps of:
subtracting the execution starting time of the target execution function from the execution ending time of the target execution function to obtain the execution time consumption of the target execution function;
and taking the time consumption of the execution of the target execution function as the performance monitoring data of the application.
13. The client of claim 8, wherein a plurality of the target execution functions are included in the business-associated class file; the log data comprises the execution starting time and the execution ending time of the target execution function; the computer program, when executed by the processor, further performs the steps of:
Determining function call information of the first execution function for calling the second execution function according to a first execution function and a second execution function in the target execution functions if the execution process of the first execution function is between the execution starting time and the execution ending time of the second execution function;
and taking the function call information as the performance monitoring data of the application.
14. The client according to claim 8, wherein the computer program, when executed by the processor, further performs the steps of:
judging whether the log data of the target execution function comprises the execution starting time and the execution ending time of the target execution function or not; and if so, determining the performance monitoring data of the application according to the log data.
CN201811062546.4A 2018-09-12 2018-09-12 Application performance monitoring method and client Active CN110895503B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811062546.4A CN110895503B (en) 2018-09-12 2018-09-12 Application performance monitoring method and client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811062546.4A CN110895503B (en) 2018-09-12 2018-09-12 Application performance monitoring method and client

Publications (2)

Publication Number Publication Date
CN110895503A CN110895503A (en) 2020-03-20
CN110895503B true CN110895503B (en) 2024-04-12

Family

ID=69784857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811062546.4A Active CN110895503B (en) 2018-09-12 2018-09-12 Application performance monitoring method and client

Country Status (1)

Country Link
CN (1) CN110895503B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111831275B (en) * 2020-07-14 2023-06-30 绿盟科技集团股份有限公司 Method, server, medium and computer equipment for arranging micro-scene script
CN112468594A (en) * 2020-12-01 2021-03-09 北京秒针人工智能科技有限公司 Method, system, equipment and storage medium for customized data transmission
CN114326670B (en) * 2021-12-24 2024-03-05 北京龙鼎源科技股份有限公司 Detection method and device for executing tasks by controller, storage medium and electronic device
CN115859368B (en) * 2023-02-07 2023-05-12 支付宝(杭州)信息技术有限公司 Data desensitization method, device, equipment and readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004265061A (en) * 2003-02-28 2004-09-24 Canon Inc Program installing method, device and system
CN101320350A (en) * 2008-07-17 2008-12-10 金蝶软件(中国)有限公司 Performance monitoring method and device
CN101458754A (en) * 2009-01-09 2009-06-17 清华大学 Method and apparatus for monitoring application program action
CN101848477A (en) * 2009-03-24 2010-09-29 亚信科技(中国)有限公司 Method and system for diagnosing fault
CN102360328A (en) * 2011-09-29 2012-02-22 用友软件股份有限公司 Programmed monitoring device and programmed monitoring method
CN104462688A (en) * 2014-12-05 2015-03-25 国家电网公司 Operation simulation system of power grid information equipment
CN106557694A (en) * 2016-11-24 2017-04-05 北京瑞星信息技术股份有限公司 Linux file operations monitoring method and device
CN107145429A (en) * 2017-06-01 2017-09-08 成都通甲优博科技有限责任公司 A kind of log analysis method and system
CN107168844A (en) * 2016-03-07 2017-09-15 中国移动通信集团河南有限公司 A kind of method and device of performance monitoring
CN108228147A (en) * 2016-12-15 2018-06-29 中国移动通信集团公司 A kind of performance data journal obtaining method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8473922B2 (en) * 2001-09-19 2013-06-25 Hewlett-Packard Development Company, L.P. Runtime monitoring in component-based systems
CA2672336A1 (en) * 2009-07-15 2011-01-15 Ibm Canada Limited - Ibm Canada Limitee Tool for analyzing and resolving errors in a process server

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004265061A (en) * 2003-02-28 2004-09-24 Canon Inc Program installing method, device and system
CN101320350A (en) * 2008-07-17 2008-12-10 金蝶软件(中国)有限公司 Performance monitoring method and device
CN101458754A (en) * 2009-01-09 2009-06-17 清华大学 Method and apparatus for monitoring application program action
CN101848477A (en) * 2009-03-24 2010-09-29 亚信科技(中国)有限公司 Method and system for diagnosing fault
CN102360328A (en) * 2011-09-29 2012-02-22 用友软件股份有限公司 Programmed monitoring device and programmed monitoring method
CN104462688A (en) * 2014-12-05 2015-03-25 国家电网公司 Operation simulation system of power grid information equipment
CN107168844A (en) * 2016-03-07 2017-09-15 中国移动通信集团河南有限公司 A kind of method and device of performance monitoring
CN106557694A (en) * 2016-11-24 2017-04-05 北京瑞星信息技术股份有限公司 Linux file operations monitoring method and device
CN108228147A (en) * 2016-12-15 2018-06-29 中国移动通信集团公司 A kind of performance data journal obtaining method and device
CN107145429A (en) * 2017-06-01 2017-09-08 成都通甲优博科技有限责任公司 A kind of log analysis method and system

Also Published As

Publication number Publication date
CN110895503A (en) 2020-03-20

Similar Documents

Publication Publication Date Title
CN110895503B (en) Application performance monitoring method and client
CN110716910B (en) Log management method, device, equipment and storage medium
US9836346B2 (en) Error troubleshooting using a correlated knowledge base
US10025694B1 (en) Monitoring activity of software development kits using stack trace analysis
US20190258822A1 (en) Efficient application feedback collection
CN109949156B (en) Data processing method and server of blockchain contracts
US11310066B2 (en) Method and apparatus for pushing information
CN107066519B (en) Task detection method and device
US20240121319A1 (en) Methods and systems for communicating relevant content
CN110750437B (en) Equipment debugging method, device, equipment and system
US11934287B2 (en) Method, electronic device and computer program product for processing data
CN110602163B (en) File uploading method and device
CN111796997A (en) Log information processing method and device and electronic equipment
CN110599004A (en) Risk control method, equipment, medium and device
CN111753328B (en) Private data leakage risk detection method and system
CN111314737A (en) Video transcoding method and device
GB2542370A (en) A system for monitoring a plurality of distributed devices
CN115659340B (en) Counterfeit applet identification method and device, storage medium and electronic equipment
US10944587B2 (en) Event processing associated with a smart device
CN110858142B (en) Application starting method and device
US10768917B2 (en) Dynamic deployment placement of processing elements in a streaming data system
CN107451050B (en) Function acquisition method and device and server
CN112016059A (en) Method, apparatus, device and storage medium for processing data
CN111797070A (en) Ticket data processing method and device
US9619273B2 (en) Profiling multiple virtual machines in a distributed system

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200511

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Address before: 200241, room 2, floor 02, building 555, Dongchuan Road, Minhang District, Shanghai

Applicant before: CHUANXIAN NETWORK TECHNOLOGY (SHANGHAI) Co.,Ltd.

GR01 Patent grant
GR01 Patent grant