Performance monitoring method, device, equipment, server and storage medium
By obtaining and running the built-in monitoring script in the terminal device and directly uploading the monitoring data to the server for analysis, the problem of low monitoring efficiency in the existing technology is solved and a more efficient performance monitoring process is achieved.
Patent Information
- Application Number
- CN201910955244.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-09
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2039-10-09
AI Technical Summary
When monitoring the performance of an application using the existing technology, a monitoring script needs to be delivered to the terminal device every time it is monitored or adjusted, resulting in reduced monitoring efficiency.
By obtaining monitoring configuration information from the terminal device, running the built-in monitoring script to obtain monitoring data, and directly uploading it to the server for performance monitoring and analysis, avoiding the script loading process for each monitoring.
It improves the efficiency of performance monitoring, reduces preliminary preparation time, and improves monitoring efficiency.
Smart Images

Figure CN112650656B
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a performance monitoring method, apparatus, device, server, and storage medium. Background Art
[0002] The performance of an application directly affects the user experience. By monitoring the performance of an application, the server can understand the various performance conditions of the application and further optimize the performance of the application by analyzing the performance conditions.
[0003] In the prior art, the monitoring and collection of the performance status of an application usually involves loading a monitoring script from a server each time a performance monitoring operation is performed on the monitored application, obtaining monitoring data corresponding to the fixed monitoring configuration information in the monitoring script, and performing performance monitoring analysis on the obtained monitoring data through the server.
[0004] In the process of implementing the present invention, the inventors found that the prior art has at least the following problems: since a monitoring script needs to be sent to the terminal device each time the performance of the application to be monitored is monitored or the monitoring configuration information of the application to be monitored is adjusted, the monitoring efficiency is reduced. Summary of the invention
[0005] The present invention provides a performance monitoring method, device, equipment, server and storage medium to improve the monitoring efficiency when the performance of an application is monitored.
[0006] In a first aspect, an embodiment of the present invention provides a performance monitoring method, which is applied to a terminal device, including:
[0007] Get monitoring configuration information;
[0008] Run the monitoring script built into the application to be monitored to obtain monitoring data of the application to be monitored corresponding to the monitoring configuration information; upload the monitoring data to the server so that the server performs performance monitoring and analysis on the application to be monitored based on the monitoring data.
[0009] In a second aspect, an embodiment of the present invention further provides a performance monitoring device, which is configured in a terminal device and includes:
[0010] Configuration information acquisition module, used to obtain monitoring configuration information;
[0011] A monitoring data determination module, used for running a monitoring script built into the application to be monitored to obtain monitoring data corresponding to the monitoring configuration information of the application to be monitored;
[0012] The monitoring data uploading module is used to upload the monitoring data to the server so that the server can perform performance monitoring and analysis on the application to be monitored based on the monitoring data.
[0013] In a third aspect, an embodiment of the present invention further provides a terminal device, including:
[0014] one or more processors;
[0015] A memory for storing one or more programs;
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement a performance monitoring method as provided in the first aspect embodiment.
[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a performance monitoring method as provided in the embodiment of the first aspect.
[0018] The embodiment of the present invention obtains monitoring configuration information and runs the monitoring script built into the application to be monitored to obtain monitoring data corresponding to the monitoring configuration information of the application to be monitored; the monitoring data is uploaded to the server so that the server performs performance monitoring analysis on the application to be monitored based on the monitoring data. The above technical solution obtains monitoring data through the monitoring script built into the application to be monitored, and there is no need to load the monitoring script every time the performance of the application to be monitored is monitored or the monitoring configuration information of the application to be monitored is adjusted, which reduces the time spent on the preliminary preparation of performance monitoring and thus improves the monitoring efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a flow chart of a performance monitoring method in Embodiment 1 of the present invention;
[0020] Figure 2 is a flow chart of a performance monitoring method in Embodiment 2 of the present invention;
[0021] Figure 3 is a flow chart of a performance monitoring method in Embodiment 3 of the present invention;
[0022] Figure 4 is a flow chart of a performance monitoring method in Embodiment 4 of the present invention;
[0023] Figure 5 is a structural diagram of a performance monitoring device in Embodiment 5 of the present invention;
[0024] Figure 6 It is a structural diagram of a terminal device in Embodiment 6 of the present invention. DETAILED DESCRIPTION
[0025] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0026] Embodiment 1
[0027] Figure 1 This is a flow chart of a performance monitoring method in Embodiment 1 of the present invention. The embodiment of the present invention is applicable to the case where performance indicators of an application installed in a terminal device are monitored. The method is executed by a performance monitoring device, which is implemented by software and / or hardware and is specifically configured in a terminal device installed with the application to be monitored. The terminal device may be a mobile terminal such as a smart phone, a tablet computer, a personal computer, or a fixed device such as a desktop computer.
[0028] like Figure 1 A performance monitoring method is shown, comprising:
[0029] S110: Obtain monitoring configuration information.
[0030] Optionally, the monitoring configuration information may be obtained locally from the terminal device. Specifically, the installation directory of the application to be monitored is determined, and the monitoring configuration information is obtained in the installation directory.
[0031] Alternatively, the monitoring configuration information may be obtained from a server, specifically, by sending a request message to the server, and receiving the monitoring configuration information corresponding to the application identifier to be monitored fed back by the server based on the request message; wherein the request message includes the application identifier to be monitored.
[0032] The monitoring configuration information includes the monitoring type of the application to be monitored. The monitoring type includes at least one of a network, a page, a web view control, and a thread. It is understandable that the monitoring type may also include other monitoring types related to the performance of the application to be monitored, and the embodiment of the present invention does not make any limitation on this.
[0033] If the monitoring type includes network, the performance monitoring parameters include at least one of return code, upstream and downstream traffic, DNS (Domain Name System) query time, and response time; if the monitoring type includes page, the performance monitoring parameters include frame rate, traffic, CPU (Central Processing Unit) memory, and at least one of maximum memory increment; if the monitoring type includes web view control, the performance monitoring parameters include loading time, and / or startup time; if the monitoring type includes thread, the performance monitoring parameters include parameters for whether freeze occurs. It can be understood that the performance monitoring parameters included in different monitoring types can also be added or adjusted as needed.
[0034] It should be noted that in order to comprehensively consider the traffic consumption during data transmission between the terminal device and the server during the subsequent uploading of monitoring data to the server, the application developer or application manager of the monitored application can adjust the monitoring type and the number of performance monitoring parameters corresponding to each monitoring type as needed to achieve coarser or finer-grained monitoring of the monitored application.
[0035] S120: Run a monitoring script built into the application to be monitored to obtain monitoring data of the application to be monitored corresponding to the monitoring configuration information.
[0036] A monitoring script is built into the installation package of the application to be monitored, and the monitoring script is used to collect and acquire monitoring data according to the monitoring configuration information.
[0037] Specifically, the monitoring configuration information is used as an input parameter of the monitoring script, and the monitoring data corresponding to the monitoring configuration information of the application to be monitored is obtained by running the monitoring script.
[0038] The monitoring script includes a data acquisition method corresponding to the acquisition of monitoring data corresponding to performance monitoring parameters of different monitoring types.
[0039] S130: Upload the monitoring data to a server, so that the server performs performance monitoring and analysis on the application to be monitored according to the monitoring data.
[0040] In this step, the terminal device uploads the collected monitoring data to the server in real time or periodically; after receiving the monitoring data, the server performs performance monitoring and analysis on the application to be monitored based on the monitoring data and the monitoring data of the application to be monitored received historically.
[0041] Optionally, the server performs performance monitoring and analysis on the monitored application based on the monitoring data, which may be by comparing the monitoring data of each different monitoring type with an abnormal threshold corresponding to a preset monitoring type; when the monitoring data exceeds the abnormal threshold, the monitoring data is determined to be abnormal monitoring data.
[0042] Optionally, when the monitoring type includes threads, and the corresponding performance monitoring parameters include parameters for determining whether a jam has occurred, since the server itself cannot determine the parameters for determining whether a jam has occurred, a message queue may be set on the server side, and monitoring data may be obtained through the message queue. Symbol files in the monitoring data may be parsed and processed to determine whether a jam has occurred, and the determined jam result may be sent to the server. Exemplarily, the message queue may be a distributed message queue. For example, it may be Kafka.
[0043] Of course, in order to realize the visualization of the performance monitoring results of the application to be monitored, the filter conditions entered by the monitoring user in the monitoring management interface of the server can also be obtained; the performance monitoring analysis results are counted according to the filter conditions, and the statistical results are graphically displayed. For example, at least one of a bar chart, a line chart, a curve chart, and a pie chart can be used.
[0044] The embodiment of the present invention obtains monitoring configuration information and runs the monitoring script built into the application to be monitored to obtain monitoring data corresponding to the monitoring configuration information of the application to be monitored; the monitoring data is uploaded to the server so that the server performs performance monitoring analysis on the application to be monitored based on the monitoring data. The above technical solution obtains monitoring data through the monitoring script built into the application to be monitored, and there is no need to load the monitoring script every time the performance of the application to be monitored is monitored or the monitoring configuration information of the application to be monitored is adjusted, which reduces the time spent on the preliminary preparation of performance monitoring and thus improves the monitoring efficiency.
[0045] Embodiment 2
[0046] Figure 2 It is a flow chart of a performance monitoring method in the second embodiment of the present invention. The embodiment of the present invention is optimized and improved on the basis of the technical solutions of the above embodiments.
[0047] Furthermore, the operation of "obtaining monitoring configuration information" is refined into "determining the installation directory of the application to be monitored, and obtaining monitoring configuration information under the installation directory" to improve the solution of monitoring information locally from the terminal device.
[0048] like Figure 2 A performance monitoring method is shown, comprising:
[0049] S210: Determine the installation directory of the application to be monitored, and obtain monitoring configuration information in the installation directory.
[0050] Optionally, when the terminal device is currently in a network-free environment, the installation directory of the application to be monitored is determined, and the pre-stored monitoring configuration information of the application to be monitored is searched in the installation directory.
[0051] In order to ensure the timeliness of the monitoring configuration information stored in the local system of the terminal device, in an optional implementation of an embodiment of the present invention, when the terminal device switches from a network-free environment to a networked environment, it can also send a request message to the server, and receive the monitoring configuration information corresponding to the application identifier to be monitored that is fed back by the server based on the request information; wherein the request information includes the application identifier to be monitored.
[0052] In order to ensure the timeliness of the monitoring configuration information stored in the local system of the terminal device, in another optional implementation of the embodiment of the present invention, when the monitoring configuration information in the server changes, an update request sent by the server can also be received, and the update request includes the adjusted monitoring configuration information; the server receives the adjusted monitoring configuration information and updates the monitoring configuration information under the installation directory.
[0053] Exemplarily, in the monitoring management interface of the application to be monitored corresponding to the server, the performance monitoring parameters corresponding to at least one monitoring type and / or the monitoring status corresponding to at least one monitoring type can be adjusted; the monitoring configuration information can be adjusted according to the adjusted monitoring status and / or performance monitoring parameters of each monitoring type, and an update request can be generated based on the adjusted monitoring configuration information; the update request can be sent to the terminal device so that the terminal device updates the monitoring configuration information under the installation directory according to the monitoring configuration information in the update request.
[0054] S220, running a monitoring script built into the application to be monitored to obtain monitoring data of the application to be monitored corresponding to the monitoring configuration information;
[0055] S230: Upload the monitoring data to a server, so that the server performs performance monitoring and analysis on the application to be monitored according to the monitoring data.
[0056] It should be noted that when the terminal device is currently in an offline environment, the acquired monitoring data can be first stored locally in the terminal device, and when the terminal device is in a networked environment, the locally stored monitoring data can be uploaded to the server.
[0057] It is understandable that in order to save the memory occupied by the monitoring data locally in the terminal device, after uploading the locally stored monitoring data to the server, the uploaded monitoring data stored locally in the terminal device will be cleaned up regularly.
[0058] The embodiment of the present invention refines the step of obtaining the monitoring configuration information into determining the installation directory of the application to be monitored and obtaining the monitoring configuration information under the installation directory, so as to obtain the monitoring data of the application in an environment with or without a network, so that the server can receive the monitoring data in different network environments, realize all-round monitoring of the application usage process, and thus improve the completeness and accuracy of the performance monitoring analysis results.
[0059] Embodiment 3
[0060] Figure 3 It is a flow chart of a performance monitoring method in Embodiment 3 of the present invention. The embodiment of the present invention is optimized and improved on the basis of the technical solutions of the above embodiments.
[0061] Furthermore, the operation of "obtaining the monitoring data of the application to be monitored according to the monitoring configuration information" is refined into "parsing the monitoring configuration information to obtain the monitoring type, and obtaining the monitoring data by calling the data acquisition method corresponding to the monitoring type" to improve the monitoring data acquisition mechanism.
[0062] Furthermore, when executing "uploading the monitoring data to the server", the operation of "uploading the user account and / or device identification corresponding to the monitoring data to the server, so that the server classifies the monitoring data according to the user account and / or device identification" is added; accordingly, the operation of "performing performance monitoring and analysis on the application to be monitored according to the monitoring data" is refined into "performing performance monitoring and analysis on the application to be monitored according to the classified monitoring data" to further improve the accuracy of the performance monitoring and analysis results.
[0063] like Figure 3 A performance monitoring method is shown, comprising:
[0064] S310: Obtain monitoring configuration information.
[0065] S320: Parse the monitoring configuration information to obtain a monitoring type, and acquire the monitoring data corresponding to the monitoring configuration information by calling a data acquisition method corresponding to the monitoring type.
[0066] The data acquisition method can be determined based on the functional operation method corresponding to the application to be monitored during the application development stage. Specifically, a preset functional operation method can be generated according to the monitoring requirements, and each functional operation method corresponding to the application to be monitored can be replaced, so that when the replaced preset functional operation method is run, the monitoring data can be effectively acquired within the life cycle of the functional operation corresponding to each monitoring type. Optionally, black magic can be used to replace the functional operation method.
[0067] It is understandable that different functional operations have different corresponding life cycles. For example, when performing a page opening operation, the corresponding life cycle is the time period from page startup to display; when performing a network connection request, the corresponding life cycle is the time period from sending a network connection request to the network connection being successful.
[0068] S330, uploading the monitoring data and the user account and / or device identification corresponding to the monitoring data to the server, so that the server classifies the monitoring data according to the user account and / or device identification, and performs performance monitoring and analysis on the application to be monitored based on the classified monitoring data.
[0069] It is understandable that there are many factors that affect the performance monitoring and analysis results of the application to be monitored, including problems with the application code to be monitored, problems with the user's login account, and problems with the terminal used by the user. In order to effectively locate the abnormal phenomenon of the application to be monitored caused by the code problem, when uploading the monitoring data to the server, the user account and / or device identification can also be uploaded to the server together with the corresponding monitoring data.
[0070] Accordingly, the server receives monitoring data, as well as the user account and / or device identifier corresponding to the monitoring data; classifies the monitoring data by the user account and / or device identifier; and performs performance monitoring and analysis on the application to be monitored based on the classified monitoring data. When an abnormal monitoring data set appears in a certain user account, it can be determined that the user account is abnormal; when an abnormal monitoring data set appears in the same terminal identifier (i.e., the same category of terminal device), it can be determined that the user terminal is abnormal, thereby eliminating the possibility that the abnormality comes from the code logic of the application to be monitored, and improving the accuracy of the performance monitoring and analysis results.
[0071] In an optional implementation of an embodiment of the present invention, when uploading monitoring data to a server, in order to reduce the amount of data transmission between a terminal device and a server, the terminal device may be used to perform a preliminary screening of abnormalities in the monitoring data, and the screened monitoring data may be uploaded to the server. Exemplarily, for each monitoring type, the monitoring data is screened according to the abnormal threshold corresponding to the monitoring type to obtain abnormal monitoring data; and the abnormal monitoring data corresponding to each monitoring type is uploaded to the server. The abnormal threshold may be pre-stored in the terminal device, for example, in the installation directory of the application to be monitored. The abnormal threshold may be set by the application developer or application tester according to needs or experience.
[0072] In another optional implementation of the embodiment of the present invention, in order to effectively locate abnormal monitoring data in the application to be monitored, the time information and location information of the monitoring data can also be synchronously acquired during the process of acquiring the monitoring data; correspondingly, when the monitoring data is determined to be abnormal monitoring data, the time source and location source of the abnormal monitoring data are located based on the time information and location information.
[0073] The time information may be the time when the monitoring data is generated, or the time interval corresponding to a certain function operation of the application to be monitored. For example, when executing a page opening operation, the monitoring data obtained is the monitoring data from the page startup time to the display time, and the corresponding time information is the time interval corresponding to the startup time to the display time.
[0074] The location information may be a page identifier displayed by the application to be monitored, and may further include the location coordinates in the page displayed by the application to be monitored. For example, when the "details page" corresponding to the product A is clicked, the "video playback window" in the "details page" cannot be displayed normally, so the page identifier of the "details page" corresponding to the product A and the location coordinates of the "video playback window" on the current page may be used as the location information.
[0075] The embodiment of the present invention improves the monitoring data acquisition mechanism by refining the monitoring data acquisition step into parsing monitoring configuration information to obtain the monitoring type, and acquiring the monitoring data by calling the data acquisition method corresponding to the monitoring type.
[0076] The embodiment of the present invention adds the user account and / or setting identifier corresponding to the architecture monitoring data and uploads them to the server during the process of uploading the monitoring data to the server, so that the server classifies the monitoring data according to the user account and / or device identifier, and performs performance monitoring and analysis on the monitored application based on the classified monitoring data, thereby eliminating the situation where the monitored application is affected by user account anomalies and / or terminal device anomalies, thereby improving the accuracy of the performance monitoring and analysis results.
[0077] Embodiment 4
[0078] Figure 4 It is a flow chart of a performance monitoring method in Embodiment 4 of the present invention. The embodiment of the present invention provides a preferred implementation method based on the technical solutions of the above embodiments.
[0079] like Figure 4 A performance monitoring method is shown, comprising:
[0080] S401. Configure the monitoring status corresponding to each monitoring type and the performance monitoring parameters of each monitoring type in the monitoring management interface corresponding to the application to be monitored in the server.
[0081] S402: The server generates monitoring configuration information according to the monitoring status corresponding to each monitoring type and the performance monitoring parameters of each monitoring type.
[0082] S403: The server sends the monitoring configuration information to the terminal device on which the application to be monitored is installed.
[0083] S404: The terminal device receives monitoring configuration information to update the monitoring configuration information in the installation directory of the application to be monitored in the terminal device.
[0084] S405: locally obtain updated monitoring configuration information, and monitor event information of each thread in the system according to the monitoring configuration information to collect monitoring data.
[0085] S406: Screen the collected monitoring data according to a preset abnormal threshold to obtain candidate monitoring data.
[0086] S407: Upload the candidate monitoring data to the server.
[0087] S408: The server performs abnormal analysis on the candidate monitoring data corresponding to each monitoring type to obtain abnormal monitoring data.
[0088] S409: When the server receives candidate monitoring data corresponding to the thread type, the consumer in the message queue obtains the symbol file in the candidate monitoring data in the server and stores it in the database of the message queue.
[0089] S410. The analysis processing program in the message queue obtains the symbol file from the database, and parses the symbol file to determine whether the thread corresponding to the candidate monitoring data is stuck, and stores the thread stuck result in the database of the message queue.
[0090] S411. The producer in the message queue reads the thread jam result from the database and feeds back the read thread jam result to the server.
[0091] S412: The server determines whether each candidate monitoring data corresponding to the thread type is abnormal monitoring data according to the received thread jam result.
[0092] S413, receiving the screening conditions input by the user in the monitoring management interface, collecting statistics on the abnormal monitoring data, and displaying the statistical results graphically.
[0093] Embodiment 5
[0094] Figure 5This is a structural diagram of a performance monitoring device in Embodiment 5 of the present invention. The embodiment of the present invention is applicable to the case where performance indicators of an application installed in a terminal device are monitored. The device is implemented by software and / or hardware and is specifically configured in a terminal device where the application to be monitored is installed. The terminal device may be a mobile terminal such as a smart phone, a tablet computer, a personal computer, or a fixed device such as a desktop computer.
[0095] like Figure 5 The performance monitoring device shown includes: a configuration information acquisition module 510 , a monitoring data determination module 520 , and a monitoring data upload module 530 .
[0096] Wherein, the configuration information acquisition module 510 is used to obtain monitoring configuration information;
[0097] A monitoring data determination module 520, configured to run a monitoring script built into the application to be monitored to obtain monitoring data corresponding to the monitoring configuration information of the application to be monitored;
[0098] The monitoring data uploading module 530 is used to upload the monitoring data to the server so that the server can perform performance monitoring and analysis on the application to be monitored according to the monitoring data.
[0099] The embodiment of the present invention obtains monitoring configuration information through a configuration information acquisition module; runs a monitoring script built into the application to be monitored through a monitoring data determination module to obtain monitoring data corresponding to the monitoring configuration information of the application to be monitored; and uploads the monitoring data to a server through a monitoring data upload module, so that the server performs performance monitoring and analysis on the application to be monitored based on the monitoring data. The above technical solution obtains monitoring data through a monitoring script built into the application to be monitored, and there is no need to load the monitoring script each time the performance of the application to be monitored is monitored or the monitoring configuration information of the application to be monitored is adjusted, thereby reducing the time spent on the preliminary preparation of performance monitoring and thereby improving monitoring efficiency.
[0100] Furthermore, the configuration information acquisition module 510 includes:
[0101] A local acquisition unit, used to determine the installation directory of the application to be monitored, and obtain monitoring configuration information in the installation directory;
[0102] The server acquisition unit is used to send request information to the server and receive monitoring configuration information corresponding to the application identifier to be monitored, which is fed back by the server based on the request information; wherein the request information includes the application identifier to be monitored.
[0103] Furthermore, the device also includes a configuration information updating module, which is specifically used to:
[0104] Receiving an update request sent by the server, wherein the update request includes the adjusted monitoring configuration information;
[0105] The monitoring configuration information under the installation directory is updated according to the adjusted monitoring configuration information.
[0106] Furthermore, the monitoring data determination module 520 is specifically configured to:
[0107] The monitoring configuration information is parsed to obtain a monitoring type, and the monitoring data is obtained by calling a data acquisition method corresponding to the monitoring type.
[0108] Furthermore, the monitoring data uploading module 530 is specifically used for:
[0109] For each monitoring type, determining abnormal monitoring data according to an abnormal threshold value corresponding to the monitoring type;
[0110] Upload the abnormal monitoring data corresponding to each monitoring type to the server.
[0111] Furthermore, the monitoring data uploading module 530 is specifically used for:
[0112] When uploading the monitoring data to the server, uploading the user account and / or device identification corresponding to the monitoring data to the server, so that the server classifies the monitoring data according to the user account and / or device identification;
[0113] Correspondingly, the server performs performance monitoring and analysis on the application to be monitored according to the monitoring data, specifically for:
[0114] Perform performance monitoring and analysis on the application to be monitored based on the classified monitoring data.
[0115] Further, the monitoring configuration information includes a monitoring type;
[0116] The monitoring type includes: at least one of a network, a page, a web page view control, and a thread.
[0117] Furthermore, the monitoring configuration information also includes performance monitoring parameters;
[0118] If the monitoring type includes network, the performance monitoring parameter includes at least one of a return code, upstream and downstream traffic, a domain name system DNS query time, and a response time;
[0119] If the monitoring type includes a page, the performance monitoring parameter includes at least one of a frame rate, a flow rate, a central processing unit CPU memory, and a maximum memory increment;
[0120] If the monitoring type includes a web view control, the performance monitoring parameters include loading time and / or startup time;
[0121] If the monitoring type includes threads, the performance monitoring parameters include parameters for whether a freeze occurs.
[0122] The above-mentioned performance monitoring device can execute the performance monitoring method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the performance monitoring method.
[0123] Embodiment 6
[0124] Figure 6 is a structural diagram of a terminal device in Embodiment 6 of the present invention. Figure 6 The terminal device shown includes: an input device 610 , an output device 620 , a processor 630 and a storage device 640 .
[0125] Wherein, the input device 610 is used to obtain monitoring configuration information;
[0126] Output device 620, used to upload monitoring data to a terminal device;
[0127] one or more processors 630;
[0128] The storage device 640 is used to store one or more programs.
[0129] Figure 6 Taking a processor 630 as an example, the input device 610 in the terminal device can be connected to the output device 620, the processor 630 and the storage device 640 through a bus or other means, and the processor 630 and the storage device 640 are also connected through a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0130] In this embodiment, the processor 630 in the terminal device can control the input device 610 to obtain monitoring configuration information; it can also run the monitoring script built into the application to be monitored to obtain monitoring data of the application to be monitored corresponding to the monitoring configuration information; it can also control the output device 620 to upload the monitoring data to the terminal device, so that the terminal device performs performance monitoring and analysis on the application to be monitored based on the monitoring data.
[0131] The storage device 640 in the terminal device is a computer-readable storage medium that can be used to store one or more programs, which can be software programs, computer executable programs, and modules, such as program instructions / modules corresponding to the control performance monitoring method in the embodiment of the present invention (for example, the attached Figure 5The processor 630 executes various functional applications and data processing of the terminal device by running the software programs, instructions and modules stored in the storage device 640, that is, the performance monitoring method in the above method embodiment is implemented.
[0132] The storage device 640 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data, etc. (such as monitoring configuration information, monitoring scripts, and monitoring data, etc. in the above-mentioned embodiments). In addition, the storage device 640 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the storage device 640 may further include a memory remotely arranged relative to the processor 630, and these remote memories may be connected to the server via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0133] Embodiment 7
[0134] Embodiment 7 of the present invention also provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a performance monitoring device, the performance monitoring method provided by the embodiment of the present invention is implemented and applied to a terminal device. The method includes: obtaining monitoring configuration information; running a monitoring script built into the application to be monitored to obtain monitoring data of the application to be monitored corresponding to the monitoring configuration information; uploading the monitoring data to a server so that the server performs performance monitoring and analysis on the application to be monitored based on the monitoring data.
[0135] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0136] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A performance monitoring method, It is characterized in that include: Get monitoring configuration information; Running a monitoring script built into the application to be monitored to obtain monitoring data corresponding to the monitoring configuration information of the application to be monitored, wherein the monitoring script includes a data acquisition method corresponding to the acquisition of monitoring data corresponding to performance monitoring parameters of different monitoring types; Uploading the monitoring data to a server so that the server performs performance monitoring and analysis on the application to be monitored according to the monitoring data; The obtaining of monitoring configuration information includes: Determine the installation directory of the application to be monitored, and obtain monitoring configuration information under the installation directory; The step of running a monitoring script built into the application to be monitored to obtain monitoring data of the application to be monitored corresponding to the monitoring configuration information includes: The monitoring configuration information is used as an input parameter of the monitoring script, and the monitoring data corresponding to the monitoring configuration information of the application to be monitored is obtained by running the monitoring script; Wherein, the method further comprises: The monitoring management interface corresponding to the application to be monitored in the server configures the monitoring status corresponding to each monitoring type and the performance monitoring parameters of each monitoring type; the server generates monitoring configuration information according to the monitoring status corresponding to each monitoring type and the performance monitoring parameters of each monitoring type; the server sends the monitoring configuration information to the terminal device installed with the application to be monitored; The terminal device receives the monitoring configuration information to update the monitoring configuration information under the installation directory of the application to be monitored in the terminal device; locally obtains the updated monitoring configuration information, and monitors the event information of each thread in the system according to the monitoring configuration information to collect monitoring data; according to the pre-set abnormal threshold, the collected monitoring data is screened to obtain candidate monitoring data; and the candidate monitoring data is uploaded to the server; The server performs abnormal analysis on the candidate monitoring data corresponding to each monitoring type to obtain abnormal monitoring data; when the server receives the candidate monitoring data corresponding to the thread type, the consumer in the message queue obtains the symbol file in the candidate monitoring data in the server and stores it in the database of the message queue; the analysis processing program in the message queue obtains the symbol file from the database, and parses the symbol file to determine whether the thread corresponding to the candidate monitoring data is stuck, and stores the thread stuck result in the database of the message queue; the producer in the message queue reads the thread stuck result from the database, and feeds back the read thread stuck result to the server; the server determines whether each candidate monitoring data corresponding to the thread type is abnormal monitoring data according to the received thread stuck result; Receive the filtering conditions entered by the user in the monitoring management interface, collect statistics on abnormal monitoring data, and display the statistical results graphically.
2. The method according to claim 1, It is characterized in that Also includes: Receiving an update request sent by the server, wherein the update request includes the adjusted monitoring configuration information; The monitoring configuration information under the installation directory is updated according to the adjusted monitoring configuration information.
3. The method according to claim 1, It is characterized in that Acquiring monitoring data corresponding to the monitoring configuration information of the application to be monitored, including: The monitoring configuration information is parsed to obtain a monitoring type, and the monitoring data corresponding to the monitoring configuration information is obtained by calling a data acquisition method corresponding to the monitoring type.
4. The method according to claim 3, It is characterized in that Uploading the monitoring data to a server includes: For each monitoring type, the monitoring data is screened according to the abnormal threshold value corresponding to the monitoring type to obtain abnormal monitoring data; Upload the abnormal monitoring data corresponding to each monitoring type to the server.
5. The method according to claim 1, It is characterized in that When uploading the monitoring data to the server, it also includes: Uploading the user account and / or device identification corresponding to the monitoring data to the server, so that the server classifies the monitoring data according to the user account and / or device identification; Accordingly, the performance monitoring and analysis of the application to be monitored is performed according to the monitoring data, including: Perform performance monitoring and analysis on the application to be monitored based on the classified monitoring data.
6. The method according to any one of claims 1 to 5, It is characterized in that The monitoring configuration information includes a monitoring type; The monitoring type includes: at least one of a network, a page, a web page view control, and a thread.
7. A performance monitoring device, configured in a terminal device, It is characterized in that include: Configuration information acquisition module, used to obtain monitoring configuration information; A monitoring data determination module, used to run a monitoring script built into the application to be monitored to obtain monitoring data corresponding to the monitoring configuration information of the application to be monitored, wherein the monitoring script contains a data acquisition method corresponding to the acquisition of monitoring data corresponding to performance monitoring parameters of different monitoring types; A monitoring data uploading module, used to upload the monitoring data to a server, so that the server performs performance monitoring and analysis on the application to be monitored according to the monitoring data; The configuration information acquisition module includes: A local acquisition unit, used to determine the installation directory of the application to be monitored, and obtain monitoring configuration information in the installation directory; The step of running a monitoring script built into the application to be monitored to obtain monitoring data of the application to be monitored corresponding to the monitoring configuration information includes: The monitoring configuration information is used as an input parameter of the monitoring script, and the monitoring data corresponding to the monitoring configuration information of the application to be monitored is obtained by running the monitoring script; Wherein, the device is also used for: The monitoring management interface corresponding to the application to be monitored in the server configures the monitoring status corresponding to each monitoring type and the performance monitoring parameters of each monitoring type; the server generates monitoring configuration information according to the monitoring status corresponding to each monitoring type and the performance monitoring parameters of each monitoring type; the server sends the monitoring configuration information to the terminal device installed with the application to be monitored; The terminal device receives the monitoring configuration information to update the monitoring configuration information under the installation directory of the application to be monitored in the terminal device; locally obtains the updated monitoring configuration information, and monitors the event information of each thread in the system according to the monitoring configuration information to collect monitoring data; according to the pre-set abnormal threshold, the collected monitoring data is screened to obtain candidate monitoring data; and the candidate monitoring data is uploaded to the server; The server performs abnormal analysis on the candidate monitoring data corresponding to each monitoring type to obtain abnormal monitoring data; when the server receives the candidate monitoring data corresponding to the thread type, the consumer in the message queue obtains the symbol file in the candidate monitoring data in the server and stores it in the database of the message queue; the analysis processing program in the message queue obtains the symbol file from the database, and parses the symbol file to determine whether the thread corresponding to the candidate monitoring data is stuck, and stores the thread stuck result in the database of the message queue; the producer in the message queue reads the thread stuck result from the database, and feeds back the read thread stuck result to the server; the server determines whether each candidate monitoring data corresponding to the thread type is abnormal monitoring data according to the received thread stuck result; Receive the filtering conditions entered by the user in the monitoring management interface, collect statistics on abnormal monitoring data, and display the statistical results graphically.
8. A terminal device, It is characterized in that include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a performance monitoring method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, a performance monitoring method as described in any one of claims 1 to 6 is implemented.
