A front-end performance monitoring method, device, equipment and readable storage medium
By evaluating front-end anomaly response data from multiple dimensions, the problem of resource waste and single evaluation dimensions in front-end performance monitoring is solved, enabling more refined performance monitoring and problem localization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN CHENBEI TECH CO LTD
- Filing Date
- 2023-01-17
- Publication Date
- 2026-06-23
AI Technical Summary
Existing technologies for front-end performance monitoring suffer from wasted data storage resources and a single evaluation dimension, making it difficult to pinpoint problems in detail.
By acquiring abnormal response data from the front end, a multi-dimensional evaluation is conducted using project, page, and path dimensions, and an alarm is triggered when preset alarm conditions are met.
It enables more refined front-end performance evaluation, reduces data processing volume, improves monitoring efficiency, and allows for faster problem localization.
Smart Images

Figure CN115981967B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a front-end performance monitoring method, apparatus, device, and readable storage medium. Background Technology
[0002] Currently, performance monitoring of web front-ends requires storing all response data generated by the front-end. However, since most front-end response data consists of normal data, storing a large amount of normal data is not beneficial for front-end performance analysis and wastes storage and network resources. Furthermore, the current method of evaluating front-end performance solely based on total loading time is too simplistic and has a large data granularity, resulting in insufficiently granular monitoring of front-end performance and difficulty in identifying front-end issues.
[0003] Therefore, how to more accurately evaluate front-end performance and improve the efficiency of front-end performance monitoring is a problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a front-end performance monitoring method, apparatus, device, and readable storage medium to more precisely evaluate front-end performance and improve the efficiency of front-end performance monitoring. The specific solution is as follows:
[0005] Firstly, this application provides a front-end performance monitoring method, including:
[0006] Retrieve abnormal response data generated by the front end within a preset time period;
[0007] The abnormal response data is evaluated from at least two dimensions to obtain performance evaluation data for the at least two dimensions; the at least two dimensions are determined from the project dimension, page dimension, and path dimension.
[0008] If the performance evaluation data for any dimension reaches the preset alarm conditions, an alarm will be triggered for that dimension.
[0009] Optionally, obtaining abnormal response data generated by the front end within a preset time period includes:
[0010] Query the database for the abnormal response data.
[0011] Optionally, before querying the abnormal response data in the database, the method further includes:
[0012] Obtain error response data and / or target response data whose response time exceeds expectations sent by the front end;
[0013] The error response data and / or target response data are temporarily stored in the corresponding memory queue according to the timestamp order.
[0014] The data in the memory queue is stored in the database as the exception response data.
[0015] Optionally, before storing the data in the memory queue as the exception response data in the database, the method further includes:
[0016] Determine whether the amount of data in the memory queue has reached a preset queue threshold;
[0017] If so, then the step of storing the data in the memory queue as the exception response data in the database is performed;
[0018] or
[0019] Determine if the current time for warehousing has been reached;
[0020] If so, then the step of storing the data in the memory queue as the exception response data in the database is performed.
[0021] Optionally, the performance evaluation of the abnormal response data from at least two dimensions to obtain performance evaluation data for the at least two dimensions includes:
[0022] The abnormal response data is classified according to the at least two dimensions to obtain the classification datasets corresponding to the at least two dimensions respectively;
[0023] For each classification dataset, determine the number of data entries in the current classification dataset and the target parameters to be evaluated;
[0024] Calculate the average value of the target parameter based on the number of data entries, and select at least one value to be monitored for the target parameter;
[0025] Use the average value and / or at least one value to be monitored as the evaluation item for the current classification dataset;
[0026] By summing the evaluation items of the classification datasets corresponding to the same dimension, we can obtain the performance evaluation data for that dimension.
[0027] Optionally, selecting at least one value to be monitored for the target parameter includes:
[0028] Construct an array from the values of the target parameters in the current classification dataset;
[0029] The value at the target position in the array is taken as the value to be monitored; the target position is at least one of the 50%, 90%, 95%, and 99% positions in the array.
[0030] Optionally, if the abnormal response data is target response data, the target parameters include: communication connection establishment time, server response time, page rendering time, and / or total loading time; if the abnormal response data is error response data, the target parameters include: number of errors.
[0031] Optionally, the step of issuing an alarm for any dimension if the performance evaluation data of any dimension reaches a preset alarm condition includes:
[0032] The performance evaluation data of at least two dimensions are sent to the performance monitoring platform so that when the performance monitoring platform determines that the performance evaluation data of any dimension has reached the preset alarm condition, it pushes an alarm notification message to a preset destination.
[0033] Optionally, the step of issuing an alarm for any dimension if the performance evaluation data of any dimension reaches a preset alarm condition includes:
[0034] For each evaluation item in the performance evaluation data of any dimension, if the current evaluation item exceeds its corresponding alarm threshold, an alarm will be triggered for the current evaluation item.
[0035] Secondly, this application provides a front-end performance monitoring device, comprising:
[0036] The acquisition module is used to acquire abnormal response data generated by the front end within a preset time period;
[0037] An evaluation module is used to perform performance evaluation on the abnormal response data from at least two dimensions to obtain performance evaluation data for the at least two dimensions; the at least two dimensions are determined from the project dimension, page dimension, and path dimension;
[0038] The alarm module is used to issue an alarm for any dimension if the performance evaluation data for any dimension reaches the preset alarm conditions.
[0039] Thirdly, this application provides an electronic device, comprising:
[0040] Memory, used to store computer programs;
[0041] A processor is used to execute the computer program to implement the aforementioned disclosed front-end performance monitoring method.
[0042] Fourthly, this application provides a readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned disclosed front-end performance monitoring method.
[0043] As can be seen from the above scheme, this application provides a front-end performance monitoring method, including: acquiring abnormal response data generated by the front-end within a preset time period; performing performance evaluation on the abnormal response data from at least two dimensions to obtain performance evaluation data for the at least two dimensions; the at least two dimensions are determined from the project dimension, page dimension, and path dimension; if the performance evaluation data of any dimension reaches the preset alarm condition, an alarm is triggered for that dimension.
[0044] As can be seen, this application only analyzes abnormal response data generated by the front end, without focusing on normal front end response data. Therefore, it can reduce the amount of data processing and improve analysis efficiency. Furthermore, this application performs performance evaluation on abnormal response data from at least two dimensions, namely project dimension, page dimension, and path dimension. Therefore, it can obtain performance evaluation data from at least two dimensions, thereby evaluating front end performance from multiple dimensions, making the granularity of data analysis and evaluation more refined and comprehensive. When the performance evaluation data of any dimension reaches the preset alarm conditions, this application can issue an alarm for that dimension, thereby identifying the front end problem.
[0045] Correspondingly, the front-end performance monitoring device, equipment, and readable storage medium provided in this application also have the above-mentioned technical effects. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0047] Figure 1 This is a flowchart of a front-end performance monitoring method disclosed in this application;
[0048] Figure 2 This is a schematic diagram of a software design disclosed in this application;
[0049] Figure 3 This is a schematic diagram of a data storage method disclosed in this application;
[0050] Figure 4 This is a schematic diagram of a front-end performance monitoring device disclosed in this application;
[0051] Figure 5 This is a schematic diagram of an electronic device disclosed in this application;
[0052] Figure 6 A server architecture diagram provided for this application;
[0053] Figure 7A terminal structure diagram provided for this application. Detailed Implementation
[0054] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0055] Currently, performance monitoring of web front-ends requires storing all response data generated by the front-end. However, since most front-end response data is normal, storing a large amount of normal data is not beneficial for front-end performance analysis and wastes storage and network resources. Furthermore, the current method of evaluating front-end performance using only total loading time as front-end response data has a limited evaluation dimension and coarse data granularity, resulting in insufficiently granular monitoring of front-end performance and difficulty in identifying front-end problems. Therefore, this application provides a front-end performance monitoring solution that can more precisely evaluate front-end performance and improve the efficiency of front-end performance monitoring.
[0056] See Figure 1 As shown in the figure, this application discloses a front-end performance monitoring method, including:
[0057] S101. Obtain abnormal response data generated by the front end within a preset time period.
[0058] In this embodiment, abnormal response data can be error response data and / or target response data whose response time exceeds expectations but has not timed out. Error response data refers to response data generated when an access error occurs. Target response data refers to response data with a relatively long access time but not yet timed out; that is, the expected time is less than the response timeout. Abnormal response data can be stored in a database in advance. For example, when the front-end generates error response data and / or target response data, the front-end transmits the currently generated response data to the database for storage. Therefore, in one specific implementation, obtaining abnormal response data generated by the front-end within a preset time period includes: querying the abnormal response data in the database. The database can be a non-relational database, such as Elasticsearch, which has strong search capabilities and a larger data storage capacity, making it suitable for storing abnormal response data and facilitating the location of problem data.
[0059] To ensure error-free data transmission and storage, queues can be used to guarantee data order and consistency. In one specific implementation, before querying the abnormal response data in the database, the process further includes: obtaining the error response data and / or target response data sent by the front end; temporarily storing the error response data and / or target response data in the corresponding memory queue according to the timestamp order; and storing the data in the memory queue as abnormal response data in the database.
[0060] Before storing the data in the memory queue as an exception response data in the database, the process includes: determining whether the amount of data in the memory queue has reached a preset queue threshold; if so, executing the step of storing the data in the memory queue as an exception response data in the database; or determining whether the current time point for data entry has been reached; if so, executing the step of storing the data in the memory queue as an exception response data in the database, so as to periodically store the data in the memory queue in the database.
[0061] Since the abnormal response data can be either error response data or target response data, two memory queues can be set up to temporarily store the error response data and the target response data respectively.
[0062] S102. Perform performance evaluation on the abnormal response data from at least two dimensions to obtain performance evaluation data from at least two dimensions; the at least two dimensions are determined from the project dimension, page dimension, and path dimension.
[0063] In this embodiment, the project dimension, page dimension, and path dimension are progressively refined. Specifically, a project may include multiple pages, and a page may include multiple paths. Therefore, performance evaluation of abnormal response data from these three dimensions allows for analysis of abnormal response data at different granularities, thereby obtaining corresponding evaluation data.
[0064] In one specific implementation, performance evaluation of abnormal response data is performed from at least two dimensions to obtain performance evaluation data for at least two dimensions. This includes: classifying the abnormal response data from at least two dimensions to obtain classification datasets corresponding to each of the at least two dimensions; for each classification dataset, determining the number of data entries in the current classification dataset and the target parameter to be evaluated; calculating the average value of the target parameter based on the number of data entries, and selecting at least one value to be monitored for the target parameter; using the average value and / or at least one value to be monitored as the evaluation item for the current classification dataset; and summarizing the evaluation items for the classification datasets corresponding to the same dimension to obtain the performance evaluation data for that dimension. Wherein, the communication connection establishment time refers to the time spent establishing a communication connection between the front-end and the server; the server response time refers to the time spent by the server processing the request sent by the front-end; the page rendering time refers to the time spent by the front-end rendering the page based on the data returned by the server; and the total loading time refers to the sum of the communication connection establishment time, the server response time, and the page rendering time.
[0065] In one specific implementation, selecting at least one value to be monitored for the target parameter includes: constructing an array of each value of the target parameter in the current classification dataset; selecting the value at the target position in the array as the value to be monitored; the target position is at least one of the 50%, 90%, 95%, and 99% positions in the array. If the abnormal response data is the target response data, then the target parameters include: communication connection establishment time, server response time, page rendering time, and / or total loading time; if the abnormal response data is the error response data, then the target parameters include: the number of errors.
[0066] In one example, if the front-end generates 5 pieces of target response data within a preset time period, and these 5 pieces of data are classified into two paths based on the path dimension: path 1: path = / order / v1 / getOrderDetail and path 2: path = / order / v1 / getOrderList, assuming there are 4 pieces of data belonging to path 1, namely: communication connection establishment time = 300, page rendering time = 350, total loading time = 240, server-side... The response time is 280; for b, the connection establishment time is 320, page rendering time is 310, total loading time is 260, and server response time is 290; for c, the connection establishment time is 340, page rendering time is 330, total loading time is 270, and server response time is 260; for d, the connection establishment time is 350, page rendering time is 340, total loading time is 250, and server response time is 270. These four data points constitute the classification dataset 1 corresponding to path 1. There is one data point belonging to path 2: connection establishment time is 370, page rendering time is 360, total loading time is 260, and server response time is 270. This one data point constitutes the classification dataset 2 corresponding to path 2.
[0067] Since path 1: path = / order / v1 / getOrderDetail and path 2: path = / order / v1 / getOrderList belong to the same page, these 5 data items are classified from the page dimension and are classified into the same category dataset 3.
[0068] If we categorize these 5 data points by project dimension, they will still be classified into the same category dataset, resulting in category dataset 3. Since the project dimension classification overlaps with the page dimension classification, we can abandon the project dimension analysis at this point and only perform data analysis from the page and path dimensions.
[0069] As can be seen, there can be at least one classification dataset under the same dimension, and this embodiment can perform analysis and performance evaluation for each classification dataset.
[0070] Taking the above example, for classification dataset 1, which includes 4 data entries, the target parameters to be evaluated are connection establishment time, server response time, page rendering time, and total loading time. Based on the 4 data entries, the average values of connection establishment time, server response time, page rendering time, and total loading time are calculated respectively. Taking connection establishment time as an example, the average value of connection establishment time is: average = (300 + 320 + 340 + 350) / 4 = 336. Accordingly, the average values of server response time, page rendering time, and total loading time can be calculated accordingly. The next step is to select at least one value to monitor for each of the following: communication connection establishment time, server response time, page rendering time, and total loading time. Taking communication connection establishment time as an example, the four values of communication connection establishment time, 300, 320, 340, and 350, are constructed into an array arr = [300, 320, 340, 350]. The values are arranged in ascending order in the array. The value at the 50th percentile of this array is 340, which can be represented as: 50p = arr[int(4*0.5)] = 340. Here, "int(4*0.5)" means: rounding the result of 4*0.5 to get the label 2. According to the labels 0, 1, 2, and 3 of the values in the array, we can determine that label 2 corresponds to 340.
[0071] Correspondingly, the values at the 90%, 95%, and 99% positions in the array arr = [300, 320, 340, 350] are: 90p = arr[int(4*0.9)] = 350, 95p = arr[int(4*0.95)] = 350, and 99p = arr[int(4*0.99)] = 350. The evaluation items regarding communication connection establishment time in Classification Dataset 1 include: Communication connection establishment time: average / path = / order / v1 / getOrderDetail = 336; Communication connection establishment time: 50p / path = / order / v1 / getOrderDetail = 340; Communication connection establishment time: 90p / path = / order / v1 / getOrderDetail = 350; Communication connection establishment time: 95p / path = / order / v1 / getOrderDetail = 350; Communication connection establishment time: 99p / path = / order / v1 / getOrderDetail = 350. Based on the above principles, the page rendering time, total loading time, and server response time in Classification Dataset 1 are calculated separately, which will not be elaborated further in this embodiment.
[0072] For classification dataset 2, which contains 1 data entry, taking the communication connection establishment time as an example, the mean, 50p, 90p, 95p, and 99p values are all 370. Therefore, the evaluation items for communication connection establishment time in classification dataset 2 include: Communication connection establishment time: average / path = / order / v1 / getOrderList = 370; Communication connection establishment time: 50p / path = / order / v1 / getOrderList = 370; Communication connection establishment time: 90p / path = / order / v1 / getOrderList = 370; Communication connection establishment time: 95p / path = / order / v1 / getOrderList = 370; Communication connection establishment time: 99p / path = / order / v1 / getOrderList = 370. To avoid redundancy, the calculations for page rendering time, total loading time, and server response time in classification dataset 2 will not be detailed in this embodiment.
[0073] For classification dataset 3, which includes 5 data entries, taking the communication connection establishment time as an example, we can construct an array arr = [300, 320, 340, 350, 370]. The evaluation items for communication connection establishment time in classification dataset 3 include: Communication connection establishment time: average = (336 + 370) / 2 = 353; Communication connection establishment time: 50p = arr[int(5 * 0.5)] = 340; Communication connection establishment time: 90p = arr[int(5 * 0.9)] = 370; Communication connection establishment time: 95p = arr[int(5 * 0.95)] = 370; Communication connection establishment time: 99p = arr[int(5 * 0.99)] = 370. To avoid redundancy, the calculation of page rendering time, total loading time, and server response time in classification dataset 3 will not be detailed in this embodiment.
[0074] As can be seen, for the target response data, the communication connection establishment time, server response time, page rendering time, and / or total loading time collected by the front end can be calculated and processed. Generally, if at least one of these four parameters in a request exceeds a threshold, the response data of that request is considered abnormal response data.
[0075] In one specific implementation, if the abnormal response data is error response data, then according to the above principle, the number of errors for different paths and different pages is counted to obtain the corresponding performance evaluation data. The error response data does not include parameters such as communication connection establishment time, server response time, page rendering time, and / or total loading time. This embodiment instead counts the number of errors for each dimension. That is, for the abnormal response data, the average, 50p, 90p, 95p, and 99p error counts for the same page or the same path are also calculated, with the calculation method referring to the aforementioned description.
[0076] It should be noted that calculating average, 50p, 90p, 95p, and 99p can be used to judge the quality of a project, page, or path. The quality depends not only on response time and rendering time, but also on the number of requests triggered within a certain period of time. The more requests, the worse the corresponding page performance.
[0077] S103. If the performance evaluation data of any dimension reaches the preset alarm condition, then an alarm will be triggered for that dimension.
[0078] Taking the above example, if the number 336 in "average / path= / order / v1 / getOrderDetail=336" exceeds its corresponding alarm threshold, an alarm can be triggered for path 1: path= / order / v1 / getOrderDetail and its average communication connection establishment time. It can be seen that this embodiment can trigger alarms item by item when triggering alarms for performance evaluation data of any dimension, thus allowing for more precise location of front-end problems. In one specific implementation, if performance evaluation data of any dimension reaches a preset alarm condition, an alarm is triggered for that dimension, including: sending performance evaluation data of at least two dimensions to the performance monitoring platform, so that when the performance monitoring platform determines that the performance evaluation data of any dimension has reached the preset alarm condition, it pushes an alarm notification message to a preset destination. The preset destination may be, for example, a preset email address.
[0079] As shown in the above example, performance evaluation data in one dimension includes at least one evaluation item. This embodiment can set a corresponding alarm threshold for each evaluation item. Therefore, when an evaluation item exceeds its alarm threshold, an alarm can be triggered for that evaluation item. In one specific implementation, if the performance evaluation data of any dimension reaches a preset alarm condition, an alarm is triggered for that dimension. This includes: for each evaluation item in the performance evaluation data of any dimension, if the current evaluation item exceeds its corresponding alarm threshold, an alarm is triggered for the current evaluation item. For example, if the value of an evaluation item is 40, and the alarm threshold set for that evaluation item is 35, then that evaluation item will trigger an alarm.
[0080] This embodiment only collects problematic front-end response data, which can reduce the amount of data to be collected, save storage and network resources, and calculate and process abnormal front-end response data from the dimensions of path, page, and project, so as to analyze data from different granularities and provide more favorable data support for front-end performance evaluation.
[0081] As can be seen, this embodiment does not focus on normal front-end response data, thus reducing the amount of data processing and improving analysis efficiency. Furthermore, this application performs performance evaluation on abnormal response data from at least two dimensions, namely project dimension, page dimension, and path dimension, thus obtaining performance evaluation data from at least two dimensions. This allows for evaluation of front-end performance from multiple dimensions, making the granularity of data analysis and evaluation more refined and comprehensive. When the performance evaluation data of any dimension reaches the preset alarm condition, this application can issue an alarm for that dimension, thereby identifying the front-end problem.
[0082] Based on the above embodiments, when designing specific software programs, the software programs can be divided into modules, making the division of code functions clearer, the code more robust, and the scalability stronger.
[0083] Please see Figure 2 The software program that allows users to create workflow instances mainly implements the following functions: The software program's interface receives abnormal performance data (i.e., abnormal response data) from the front end and stores it in a memory queue; it periodically uploads all data in the memory queue to a database (such as Elastic Search); every minute, it retrieves abnormal performance data for a specified time period from the database, performs calculations on it, and uploads the calculated monitoring items (i.e., evaluation items) to a performance monitoring platform (such as Open Falcon), enabling the performance monitoring platform to issue alarms for each monitoring item based on thresholds.
[0084] The abnormal response data is either the error response data or the target response data. Please refer to [link / reference]. Figure 3 To implement the above software program, two timed-triggered memory queues are defined to temporarily store error response data and target response data, respectively. Each memory queue allows the response data of each request to be queued sequentially, thereby ensuring data consistency. To avoid memory overflow due to excessive queue size, the following data entry actions can be set: (1) Every 10 seconds, all data in the memory queue is uploaded to the database; (2) When the number of records in the memory queue reaches 1000, all data in the memory queue is uploaded to the database, and the number of records in the queue is reset to 0.
[0085] Accordingly, a performance information table and an error information table are defined in the database. The performance information table records target response data, and the error information table records error response data. For the data in the performance information table and the error information table, monitoring items for the response data within a fixed time period can be calculated, as detailed in the relevant descriptions of the above embodiments. Each calculated monitoring item is uploaded to the performance monitoring platform to determine whether an alarm is required for each item.
[0086] Specifically, if a user experiences a momentary blank response when opening a front-end page, and the response time exceeds a set time threshold, then the page information, user information, and response time will be collected. This information is temporarily stored in a memory queue corresponding to the target response data. This queue flushes its data to disk and uploads it to the database every 10 seconds. Every minute, the target response data within one minute is retrieved from the database using the uploadEsTimestamp field and processed to obtain various monitoring items. These monitoring items are then uploaded to the performance monitoring platform. This allows for more detailed performance analysis data by viewing specific monitoring items, enabling the identification of front-end anomalies. If the performance monitoring platform receives a monitoring item for the first time, it needs to set the corresponding alarm threshold for that monitoring item. If the monitoring item uploaded to the performance monitoring platform exceeds its corresponding alarm threshold, an alarm notification can be sent to the linked DingTalk group.
[0087] As can be seen, this embodiment incorporates threshold filtering into the collection of performance data, reducing the amount of data collected and lessening the pressure on subsequent data analysis. Furthermore, storing abnormal data periodically via a queue effectively reduces the resource consumption of frequent data transmissions, and the Elastic Search database provides more suitable data storage capabilities, facilitating the retrieval of detailed data information to pinpoint problems. More importantly, this embodiment collects statistical data from project, path, and page dimensions, which is more conducive to obtaining multi-faceted and granular evaluation data. The resulting monitoring items are more comprehensive and detailed, better achieving the goal of front-end performance monitoring and increasing the effectiveness of monitoring.
[0088] The following describes a front-end performance monitoring device provided in an embodiment of this application. The front-end performance monitoring device described below and the front-end performance monitoring method described above can be referred to each other.
[0089] See Figure 4 As shown in the figure, this application discloses a front-end performance monitoring device, including:
[0090] The acquisition module 401 is used to acquire abnormal response data generated by the front end within a preset time period;
[0091] Evaluation module 402 is used to perform performance evaluation on abnormal response data from at least two dimensions to obtain performance evaluation data from at least two dimensions; the at least two dimensions are determined from the project dimension, page dimension, and path dimension;
[0092] The alarm module 403 is used to issue an alarm for any dimension if the performance evaluation data of any dimension reaches the preset alarm condition.
[0093] In one specific implementation, the acquisition module is specifically used for:
[0094] Query the database for abnormal response data.
[0095] In one specific implementation, it further includes:
[0096] The inbound storage module is used to obtain error response data and / or target response data whose response time exceeds the expectation sent by the front end; temporarily store the error response data and / or target response data into the corresponding memory queue in timestamp order; and store the data in the memory queue as abnormal response data into the database.
[0097] In one specific implementation, the storage module is further used for:
[0098] Determine whether the amount of data in the memory queue has reached the preset queue threshold;
[0099] If so, then execute the step of storing the data in the memory queue as exception response data to the database;
[0100] or
[0101] Determine if the current time for warehousing has been reached;
[0102] If so, then execute the step of storing the data in the memory queue as exception response data to the database.
[0103] In one specific implementation, the evaluation module is specifically used for:
[0104] The abnormal response data is classified according to at least two dimensions to obtain the classification datasets corresponding to at least two dimensions respectively;
[0105] For each classification dataset, determine the number of data entries in the current classification dataset and the target parameters to be evaluated; calculate the average value of the target parameters based on the number of data entries, and select at least one value to be monitored for the target parameters;
[0106] Use the average value and / or at least one value to be monitored as evaluation items for the current classification dataset;
[0107] By summing the evaluation items of the classification datasets corresponding to the same dimension, we can obtain the performance evaluation data for that dimension.
[0108] In one specific implementation, the evaluation module is specifically used for:
[0109] Construct an array of the target parameter values in the current classification dataset;
[0110] The value at the target position in the array is used as the value to be monitored; the target position is at least one of the 50%, 90%, 95%, and 99% positions in the array.
[0111] In one specific implementation, the alarm module is specifically used for:
[0112] Send performance evaluation data from at least two dimensions to the performance monitoring platform so that when the performance evaluation data in any dimension reaches the preset alarm conditions, the performance monitoring platform will push an alarm notification message to the preset destination.
[0113] In one specific implementation, the alarm module is specifically used for:
[0114] If the performance evaluation data for any dimension reaches the preset alarm conditions, an alarm will be triggered for that dimension, including:
[0115] For each evaluation item in the performance evaluation data of any dimension, if the current evaluation item exceeds its corresponding alarm threshold, an alarm will be triggered for the current evaluation item.
[0116] For more detailed information on the working process of each module and unit in this embodiment, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0117] As can be seen, this embodiment provides a front-end performance monitoring device that can more accurately evaluate front-end performance and improve the efficiency of front-end performance monitoring.
[0118] The following describes an electronic device provided in an embodiment of this application. The electronic device described below can be referred to in conjunction with the front-end performance monitoring method and apparatus described above.
[0119] See Figure 5 As shown in the figure, an embodiment of this application discloses an electronic device, including:
[0120] Memory 501 is used to store computer programs;
[0121] Processor 502 is configured to execute the computer program to implement the method disclosed in any of the above embodiments.
[0122] Furthermore, embodiments of this application also provide an electronic device. The aforementioned electronic device can be, for example,... Figure 6 The server 50 shown can also be as follows: Figure 7Terminal 60 is shown. Figure 6 and Figure 7 These are all diagrams illustrating the structure of an electronic device according to an exemplary embodiment. The content in the diagrams should not be considered as any limitation on the scope of this application.
[0123] Figure 6 This is a schematic diagram of a server structure provided in an embodiment of this application. The server 50 may specifically include: at least one processor 51, at least one memory 52, a power supply 53, a communication interface 54, an input / output interface 55, and a communication bus 56. The memory 52 stores a computer program, which is loaded and executed by the processor 51 to implement the relevant steps in monitoring the published application disclosed in any of the foregoing embodiments.
[0124] In this embodiment, the power supply 53 is used to provide operating voltage for each hardware device on the server 50; the communication interface 54 can create a data transmission channel between the server 50 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 55 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0125] In addition, the memory 52, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored on it include operating system 521, computer program 522, and data 523, etc., and the storage method can be temporary storage or permanent storage.
[0126] The operating system 521 manages and controls the various hardware devices on the server 50 and the computer program 522 to enable the processor 51 to perform operations and processing on the data 523 in the memory 52. The operating system 521 can be Windows Server, Netware, Unix, Linux, etc. The computer program 522, in addition to including a computer program capable of performing the application distribution monitoring method disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 523 may include application update information and other data, as well as application developer information.
[0127] Figure 7 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. The terminal 60 may specifically include, but is not limited to, a smartphone, tablet computer, laptop computer, or desktop computer.
[0128] Typically, the terminal 60 in this embodiment includes a processor 61 and a memory 62.
[0129] The processor 61 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 61 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 61 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 61 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 61 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0130] The memory 62 may include one or more computer-readable storage media, which may be non-transitory. The memory 62 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 62 is used to store at least the following computer program 621, which, after being loaded and executed by the processor 61, is capable of implementing the relevant steps in the monitoring method for the published application executed on the terminal side as disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 62 may also include an operating system 622 and data 623, and the storage method may be temporary or permanent storage. The operating system 622 may include Windows, Unix, Linux, etc. The data 623 may include, but is not limited to, application update information.
[0131] In some embodiments, the terminal 60 may further include a display screen 63, an input / output interface 64, a communication interface 65, a sensor 66, a power supply 67, and a communication bus 68.
[0132] Those skilled in the art will understand that Figure 7 The structure shown does not constitute a limitation on terminal 60 and may include more or fewer components than shown.
[0133] The following describes a readable storage medium provided in an embodiment of this application. The readable storage medium described below can be referred to in conjunction with the front-end performance monitoring method, apparatus and device described above.
[0134] A readable storage medium is provided for storing a computer program, wherein the computer program, when executed by a processor, implements the front-end performance monitoring method disclosed in the foregoing embodiments. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here. The readable storage medium is a computer-readable storage medium, which can be non-transitory, specifically a high-speed random access memory, or a non-volatile memory, etc.
[0135] The terms “first,” “second,” “third,” “fourth,” etc., used in this application (if applicable) are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, or apparatus that includes a series of steps or units is not necessarily limited to those explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, or apparatus.
[0136] It should be noted that the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of those features. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.
[0137] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0138] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of readable storage medium known in the art.
[0139] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A front-end performance monitoring method, characterized in that, include: Retrieve abnormal response data generated by the front end within a preset time period; The abnormal response data is evaluated from at least two dimensions to analyze the abnormal response data according to different granularities, thereby obtaining performance evaluation data from at least two dimensions; the at least two dimensions are determined from the project dimension, page dimension, and path dimension. If the performance evaluation data for any dimension reaches the preset alarm conditions, an alarm will be triggered for that dimension. The performance evaluation of the abnormal response data from at least two dimensions to obtain performance evaluation data for the at least two dimensions includes: The abnormal response data is classified according to the at least two dimensions to obtain the classification datasets corresponding to the at least two dimensions respectively; For each classification dataset, determine the number of data entries in the current classification dataset and the target parameters to be evaluated; Calculate the average value of the target parameter based on the number of data entries, and select at least one value to be monitored for the target parameter; Use the average value and / or at least one value to be monitored as the evaluation item for the current classification dataset; By summing the evaluation items of the classification datasets corresponding to the same dimension, we can obtain the performance evaluation data for that dimension. Wherein, if the abnormal response data is: the target response data where the response time exceeds the expectation, then the target parameters include: communication connection establishment time, server response time, page rendering time and / or total loading time; if the abnormal response data is: error response data, then the target parameters include: number of errors.
2. The method according to claim 1, characterized in that, The acquisition of abnormal response data generated by the front end within a preset time period includes: Query the database for the aforementioned abnormal response data; Accordingly, before querying the abnormal response data in the database, the process further includes: Obtain error response data and / or target response data whose response time exceeds expectations sent by the front end; The error response data and / or target response data are temporarily stored in the corresponding memory queue according to the timestamp order. The data in the memory queue is stored in the database as the exception response data.
3. The method according to claim 2, characterized in that, Before storing the data in the memory queue as the exception response data in the database, the method further includes: Determine whether the amount of data in the memory queue has reached a preset queue threshold; If so, then the step of storing the data in the memory queue as the exception response data in the database is performed; or Determine if the current time for warehousing has been reached; If so, then the step of storing the data in the memory queue as the exception response data in the database is performed.
4. The method according to claim 1, characterized in that, Selecting at least one value to be monitored for the target parameter includes: Construct an array from the values of the target parameters in the current classification dataset; The value at the target position in the array is taken as the value to be monitored; the target position is at least one of the 50%, 90%, 95%, and 99% positions in the array.
5. The method according to any one of claims 1 to 4, characterized in that, If the performance evaluation data of any dimension reaches the preset alarm condition, an alarm will be triggered for that dimension, including: The performance evaluation data of at least two dimensions are sent to the performance monitoring platform so that when the performance monitoring platform determines that the performance evaluation data of any dimension has reached the preset alarm condition, it pushes an alarm notification message to a preset destination.
6. The method according to any one of claims 1 to 4, characterized in that, If the performance evaluation data of any dimension reaches the preset alarm condition, an alarm will be triggered for that dimension, including: For each evaluation item in the performance evaluation data of any dimension, if the current evaluation item exceeds its corresponding alarm threshold, an alarm will be triggered for the current evaluation item.
7. A front-end performance monitoring device, characterized in that, include: The acquisition module is used to acquire abnormal response data generated by the front end within a preset time period; An evaluation module is used to perform performance evaluation on the abnormal response data from at least two dimensions, to analyze the abnormal response data according to different granularities, and to obtain performance evaluation data for the at least two dimensions; the at least two dimensions are determined from the project dimension, page dimension, and path dimension; The alarm module is used to trigger an alarm for any dimension if the performance evaluation data for any dimension reaches the preset alarm conditions. The evaluation module is specifically used for: The abnormal response data is classified according to the at least two dimensions to obtain the classification datasets corresponding to the at least two dimensions respectively; For each classification dataset, determine the number of data entries in the current classification dataset and the target parameters to be evaluated; Calculate the average value of the target parameter based on the number of data entries, and select at least one value to be monitored for the target parameter; Use the average value and / or at least one value to be monitored as the evaluation item for the current classification dataset; By summing the evaluation items of the classification datasets corresponding to the same dimension, we can obtain the performance evaluation data for that dimension. Wherein, if the abnormal response data is: the target response data where the response time exceeds the expectation, then the target parameters include: communication connection establishment time, server response time, page rendering time and / or total loading time; if the abnormal response data is: error response data, then the target parameters include: number of errors.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the method as claimed in any one of claims 1 to 6.
9. A readable storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the method as described in any one of claims 1 to 6.