Monitoring method and device of pressure test data, electronic equipment and storage medium

By acquiring stress test data in real time and automatically sampling under the condition that the performance indicators are met, the problem of time-consuming manual calculation is solved, and efficient and accurate stress test data monitoring is achieved.

CN115080329BActive Publication Date: 2026-03-17BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-20
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In existing stress tests, manual calculation of performance indicators is time-consuming, affecting monitoring efficiency and accuracy.

Method used

Real-time acquisition of stress test data from the target server; automatic sampling based on performance metrics that meet preset sampling trigger conditions; data collection using SDK or Agent mode.

Benefits of technology

It enables real-time sampling when problems occur, saving manpower costs and improving monitoring efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080329B_ABST
    Figure CN115080329B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, electronic device, and storage medium for monitoring stress test data. The method includes: acquiring stress test data of a target server in real time during a stress test; determining the value of at least one performance indicator of the target server based on the stress test data; and sampling the stress test data according to preset sampling configuration information when the value of at least one performance indicator of the target server meets preset sampling trigger conditions, thereby obtaining a sampling result. In this embodiment, stress test data can be automatically acquired in real time during the stress test, and the stress test data can be automatically sampled when the value of at least one performance indicator meets preset conditions, avoiding manual sampling and thus improving the efficiency and accuracy of data monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more specifically, to a method, apparatus, electronic device, and computer-readable storage medium for monitoring stress test data. Background Technology

[0002] Stress testing simulates the system load of real-world hardware and software environments and user operations to test the performance, reliability, and stability of the system under test. After testing, the various performance metrics of the system under test typically need to be calculated manually. However, the time cost of manually calculating these metrics is significant, thus impacting monitoring efficiency. Summary of the Invention

[0003] This disclosure provides at least one method, device, electronic device, and computer-readable storage medium for monitoring stress test data, which saves labor costs and allows for real-time sampling in case of problems with the stress test data, thereby improving the efficiency and accuracy of monitoring.

[0004] This disclosure provides a method for monitoring stress test data, including:

[0005] During the stress test of the target server, the stress test data of the target server is acquired in real time.

[0006] Based on the stress test data, determine the value of at least one performance indicator of the target server;

[0007] When the value of at least one performance indicator of the target server meets the preset sampling trigger condition, the stress test data is sampled according to the preset sampling configuration information to obtain the sampling result.

[0008] In this embodiment of the disclosure, during the stress test, the index value of at least one performance indicator is determined based on the stress test data of the target server acquired in real time. When the index value of at least one performance indicator meets the preset sampling trigger condition, the stress test data is sampled. In this way, not only is real-time sampling achieved, but manual monitoring and manual sampling are also avoided, thereby improving the efficiency and accuracy of monitoring.

[0009] In one optional implementation, the number of performance indicators is at least two. If a preset relationship is satisfied between the sum of the values ​​of the at least two performance indicators and the weighted average of the values ​​of the at least two performance indicators, it is determined that the values ​​of the at least two performance indicators satisfy the preset sampling trigger condition.

[0010] In this embodiment of the disclosure, if the sum of the values ​​of at least two performance indicators and the weighted average of the values ​​of at least two performance indicators satisfy a preset relationship, it is determined that the preset sampling trigger condition is met. This helps to improve the accuracy of determining that the preset sampling trigger condition is met.

[0011] In one optional implementation, each performance indicator corresponds to multiple indicator data, and each indicator data corresponds to a score and a weight; the indicator value of each performance indicator is obtained through the following steps:

[0012] For each performance metric, based on the stress test data, determine the scores and weights corresponding to the multiple metric data for that performance metric.

[0013] Based on the scores and weights corresponding to the multiple indicator data, the total score and weighted average score of each performance indicator are determined.

[0014] The index value of each performance index is obtained based on the ratio between the weighted average score and the total score.

[0015] In this embodiment of the disclosure, the index value of each performance index is determined by determining the total score and weighted average score under each performance index, which helps to improve the accuracy of determining the index value of each performance index.

[0016] In one optional implementation, if any one of the values ​​of the at least one performance indicator satisfies a preset condition, the value of the at least one performance indicator is determined to satisfy the preset sampling trigger condition.

[0017] In this embodiment of the disclosure, if any index value meets the preset condition, it can be determined that the index value of at least one performance index meets the preset sampling trigger condition. That is, as long as there is an index value that meets the preset condition, sampling can be performed, thus achieving adaptive sampling.

[0018] In one optional implementation, each performance indicator corresponds to multiple indicator data, and the multiple indicator data includes set target indicator data;

[0019] If the target indicator data meets the preset requirements, the indicator value of the performance indicator corresponding to the target indicator data is determined to meet the preset conditions.

[0020] In this embodiment of the disclosure, when the indicator value of the target indicator data meets the preset requirements, the indicator value of the performance indicator corresponding to the target indicator data is determined to meet the preset conditions. That is, the user can pre-set the target indicator data according to the actual situation, and when the indicator value corresponding to the specific target indicator data meets the preset requirements, adaptive sampling for the target indicator data is realized.

[0021] In one optional implementation, each performance indicator corresponds to multiple indicator data; if any of the indicator data satisfies its corresponding data indicator threshold, the indicator value of the performance indicator corresponding to the indicator data that satisfies its corresponding data indicator threshold is determined to satisfy the preset condition.

[0022] In this embodiment of the disclosure, when the value of any indicator data meets the second preset requirement, the stress test data corresponding to the indicator data whose value meets the second preset requirement can be sampled. That is, the user can also set the corresponding stress test data to be sampled when any indicator data meets the second preset requirement, so as to achieve adaptive sampling.

[0023] In one optional implementation, the performance metrics of the target server include at least one of operational performance metrics, storage performance metrics, and user performance metrics.

[0024] In one optional implementation, when the index value under the at least one performance index meets preset conditions, the stress test data is sampled according to preset sampling configuration information to obtain sampling results, including:

[0025] If the index value under at least one performance index meets the preset conditions, a sampling task is generated based on the sampling configuration information, and the sampling task is added to the sampling queue.

[0026] When the task consumer reads the sampling task from the sampling queue, it samples the stress test data to obtain the sampling result.

[0027] In this embodiment of the disclosure, when the index value under at least one performance index meets the preset conditions, a sampling task is automatically generated and added to the task queue. In this way, data sampling can be performed as soon as possible by polling the task queue.

[0028] In an optional implementation, before sampling the stress test data and obtaining the sampling result when the task consumer reads the sampling task from the sampling queue, the method further includes:

[0029] Based on a preset time interval, the system detects whether there are sampling tasks in the sampling queue.

[0030] In this embodiment of the disclosure, the existence of a sampling task is detected based on a preset time interval, thereby reducing the occurrence of missed sampling tasks.

[0031] This disclosure also provides a device for monitoring pressure test data, the device comprising:

[0032] The acquisition module is used to acquire stress test data of the target server in real time during the stress test of the target server;

[0033] The determination module is used to determine the index value of at least one performance index of the target server based on the stress test data.

[0034] The sampling module is used to sample the stress test data according to preset sampling configuration information when the index value of at least one performance index of the target server meets the preset sampling trigger condition, and obtain the sampling result.

[0035] In one optional implementation, the number of performance indicators is at least two, and the determining module is further configured to:

[0036] If a preset relationship is satisfied between the sum of the values ​​of at least two performance indicators and the weighted average of the values ​​of the at least two performance indicators, then the values ​​of the at least two performance indicators are determined to satisfy the preset sampling trigger condition.

[0037] In one optional implementation, each performance indicator corresponds to multiple indicator data, and each indicator data corresponds to a score and a weight; the determining module is specifically used for:

[0038] For each performance metric, based on the stress test data, determine the scores and weights corresponding to the multiple metric data for that performance metric.

[0039] Based on the scores and weights corresponding to the multiple indicator data, the total score and weighted average score of each performance indicator are determined.

[0040] The index value of each performance index is obtained based on the ratio between the weighted average score and the total score.

[0041] In one optional implementation, the determining module is specifically used for:

[0042] If any one of the values ​​of the at least one performance indicator satisfies a preset condition, then the value of the at least one performance indicator is determined to satisfy the preset sampling trigger condition.

[0043] In one optional implementation, each performance indicator corresponds to multiple indicator data, and the multiple indicator data includes set target indicator data; the determining module is specifically used for:

[0044] If the target indicator data meets the preset requirements, the indicator value of the performance indicator corresponding to the target indicator data is determined to meet the preset conditions.

[0045] In one optional implementation, each performance indicator corresponds to multiple indicator data; the determining module is specifically used for:

[0046] If any of the aforementioned indicator data satisfies its corresponding data indicator threshold, the indicator value of the performance indicator corresponding to the indicator data that satisfies its corresponding data indicator threshold is determined to satisfy the preset condition.

[0047] In one optional implementation, the performance metrics of the target server include at least one of operational performance metrics, storage performance metrics, and user performance metrics.

[0048] In an optional embodiment, the pressure test data monitoring device further includes a display module, the display module being used for:

[0049] Upon detecting the completion of the stress test task targeting the target server, a sampling identifier is generated based on the sampling results;

[0050] In response to the triggering of the sampling identifier, the sampling result is displayed.

[0051] In one optional implementation, the sampling module is further specifically used for:

[0052] Based on a preset time interval, the system detects whether there are sampling tasks in the sampling queue.

[0053] This disclosure also provides an electronic device, including a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the aforementioned method for monitoring stress test data is performed.

[0054] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the aforementioned method for monitoring stress test data.

[0055] For a description of the effects of the monitoring device, electronic equipment, and computer-readable storage medium for the aforementioned pressure test data, please refer to the description of the pressure test data monitoring method above; it will not be repeated here.

[0056] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0057] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.

[0058] Figure 1 A flowchart illustrating a method for monitoring stress test data provided in an embodiment of this disclosure;

[0059] Figure 2 A flowchart illustrating a method for determining the value of each performance index according to an embodiment of this disclosure;

[0060] Figure 3 This is a schematic diagram of a sampling management interface provided in an embodiment of the present disclosure;

[0061] Figure 4 A flowchart illustrating a method for obtaining sampling results provided in an embodiment of this disclosure;

[0062] Figure 5 This is a flowchart illustrating the execution of a pressure monitoring data monitoring method provided in an embodiment of this disclosure.

[0063] Figure 6 This is a schematic diagram of the structure of a pressure test data monitoring device provided in an embodiment of the present disclosure;

[0064] Figure 7 This is a schematic diagram of another pressure test data monitoring device provided in an embodiment of the present disclosure;

[0065] Figure 8 This is a schematic diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0066] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.

[0067] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0068] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0069] Stress testing, also known as load testing or performance testing, is a method for determining system stability. It is typically conducted outside the system's normal operating range to examine its functional limits and identify potential problems. After performing stress testing, the data usually needs to be analyzed. This analysis process mainly includes the following three aspects:

[0070] (1) Observe stress test data to determine if there are problems with the system. In related technologies, it is usually necessary to manually analyze stress test data to determine if there are problems with the system. This not only results in high manpower costs, but also leads to low analysis efficiency.

[0071] (2) Sampling of stress test data. When users discover problems, the sampling task is manually started. However, manual sampling cannot capture sudden problems in the first place, and cannot perform real-time sampling at the accurate time point, thus affecting the timeliness of data monitoring.

[0072] Based on the above research, this disclosure provides a method for monitoring stress test data. The method includes: acquiring stress test data of the target server in real time during stress testing of the target server; determining the index value of at least one performance indicator of the target server based on the stress test data; and sampling the stress test data according to preset sampling configuration information when the index value of at least one performance indicator of the target server meets preset sampling trigger conditions to obtain sampling results.

[0073] In this embodiment of the disclosure, during the stress test, the index value of at least one performance indicator is determined based on the stress test data of the target server acquired in real time. When the index value of at least one performance indicator meets the preset sampling trigger condition, the stress test data is sampled, avoiding manual monitoring and manual sampling. In this way, while saving labor costs, real-time sampling can be performed when problems occur, thereby improving the efficiency and accuracy of monitoring.

[0074] To facilitate understanding of this embodiment, a method for monitoring stress test data disclosed in this disclosure will first be described in detail. The subject executing the method for monitoring stress test data provided in this disclosure is generally an electronic device with certain computing power. This electronic device may include, for example, a terminal device, a server, or other processing devices. The terminal device may include mobile phones, tablet computers, vehicle-mounted devices, and wearable devices, etc.

[0075] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, big data, and artificial intelligence platforms. Other processing devices can be devices including processors and memory, and are not limited here. In some possible implementations, the method for monitoring the stress test data can be implemented by the processor calling computer-readable instructions stored in memory.

[0076] Please see Figure 1 , Figure 1 A flowchart illustrating a method for monitoring stress test data provided in an embodiment of this disclosure. Figure 1 As shown, the method for monitoring pressure test data provided in this embodiment includes the following steps S101 to S104:

[0077] S101, during the stress test of the target server, the stress test data of the target server is acquired in real time.

[0078] For example, the stress test data may include the following: CPU data, memory utilization, disk utilization, disk read / write time, number of TCP connections, system throughput (TPS), query per second (QPS), average response time (RT_AVG), maximum response time (RT_MAX), minimum response time (RT_MIN), etc., without limitation.

[0079] S102, Based on the stress test data, determine the index value of at least one performance indicator of the target server.

[0080] The performance metrics include at least one of operational performance metrics, storage performance metrics, and user performance metrics. That is, after obtaining the stress test data, the values ​​of the operational performance metrics, storage performance metrics, and user performance metrics can be determined based on the stress test data.

[0081] Specifically, for step S102, each performance indicator corresponds to multiple indicator data, and each indicator data corresponds to a score and a weight; when determining the indicator value for each performance indicator, please refer to [link to relevant documentation]. Figure 2 It may include the following S1021 to S1024:

[0082] S1021, for each performance indicator, determine the score and weight corresponding to each of the multiple indicator data based on the stress test data.

[0083] Specifically, the multiple metrics corresponding to the operational performance indicators can correspond to the following stress test data: CPU data (e.g., peak single-core CPU utilization, average overall CPU utilization, or average process CPU utilization (single thread), etc.), memory utilization, disk utilization, etc., without limitation; the multiple metrics corresponding to the storage performance indicators can correspond to the following stress test data: response time, slow query, etc., without limitation; the multiple metrics corresponding to the user performance indicators can correspond to the following stress test data: system throughput TPS, query per second QPS, wherein the multiple metrics corresponding to the user performance indicators are metric data obtained through robot data tracking simulation.

[0084] The rating type can be either `value` or `increaseRate`. `value` type metrics correspond to a rating range, and are scored based on ascending or descending order. A metric is set to measure the current metric's score, thus determining whether a risk warning is needed. `increaseRate` type is used to calculate the metric's growth rate. Specifically, for this type of metric, an upper limit time and upper limit capacity are set. This determines whether the upper limit capacity is exceeded when the upper limit time is reached, thereby determining the metric's growth rate.

[0085] The weight reflects the importance of the indicator data in the entire system. In this embodiment, the value of the weight is preset. For example, the value of the weight can be 0.5 or 0.2, etc., and there is no limitation here. Different indicator data can have the same weight or different weights.

[0086] It is understandable that stress test data and indicator data are in one-to-one correspondence. Thus, for each indicator data, its corresponding score and weight can be determined based on the stress test data.

[0087] S1022, Based on the scores and weights corresponding to the multiple indicator data, determine the total score and weighted average score of each performance indicator.

[0088] It is understandable that the total score and weighted average score for each performance indicator can be calculated using the following method:

[0089] Q = (x1*w1 + x2*w2 + ... + x n *w n ) / (w1+w2+...+w n )

[0090] Where x1, x2...x n For multiple metrics under a single performance metric, w1, w2...w n Let each indicator data point have its corresponding weight, and Q be the weighted average score under a certain performance indicator, x1*w1+x2*w2+...+x n *w n The total score for a performance metric.

[0091] S1023, Based on the ratio between the weighted average score and the total score, the index value of each performance index is obtained.

[0092] Specifically, when determining the value of each performance indicator, it can be based on the ratio between the weighted average score and the total score, where the ratio = weighted average score under the performance indicator / total score. Then, the obtained ratio is determined as the indicator value of the target server under the at least one performance indicator, that is, indicator value = Q / x1*w1+x2*w2+...+x n *w n This helps improve the accuracy of determining the value of each performance indicator.

[0093] S103, when the value of at least one performance indicator of the target server meets the preset sampling trigger condition, the stress test data is sampled according to the preset sampling configuration information to obtain the sampling result.

[0094] The preset sampling configuration information may include the following: (1) Sampling method: SDK mode and agent mode; (2) Sampling language (e.g., Go, Python, Node, C++, Rust, or Java); (3) Sampling duration, which can be set according to actual needs, such as 30 seconds or 1 minute; (4) Sampling type, such as goroutine type, stack information of all current goroutines; heap, sampling information of heap memory usage; blocks, sampling information of blocking operations; mutex, sampling information of lock contention, etc.

[0095] For example, the total score of the running performance index is S1, the weighted average score is s1, and the corresponding index value is D1 = S1 / s1; the total score of the storage performance index is S2, the weighted average score is s2, and the corresponding index value is D2 = S2 / s2; and the total score of the user performance index is S3, the weighted average score is s3, and the corresponding index value is D3 = S3 / s3; in this way, the index value of at least one performance index can be obtained, and sampling is performed when the index value of at least one performance index meets the preset sampling trigger condition.

[0096] Optionally, if there are at least two performance indicators, and a preset relationship is satisfied between the sum of the values ​​of the at least two performance indicators and the weighted average of the at least two performance indicators, then the values ​​of the at least two performance indicators are determined to satisfy the preset sampling trigger condition. The preset relationship can mean that the ratio between the weighted average of the at least two performance indicators and the sum of the values ​​of the at least two performance indicators is greater than a preset threshold. The preset threshold can be set according to actual needs, for example, 0.7. For example, if the at least two performance indicators include running performance indicators and storage performance indicators, then the sum of the values ​​of these two performance indicators can be determined to be S1+S2, and the weighted average of these two performance indicators can be determined to be s1+s2. If (s1+s2) / (S1+S2)>0.7, then the values ​​of the at least two performance indicators are determined to satisfy the preset sampling trigger condition.

[0097] In some implementations, after determining the indicator value, the risk level corresponding to the current indicator value can be determined. For example, please refer to Table 1, which is a risk level assessment standard table provided by an embodiment of this disclosure.

[0098] Table 1

[0099] Health status (indicator value) Risk level 0%~60% high 60%~80% middle 80%~100% Low

[0100] In other words, the risk level of the target server can be determined based on the indicator value, and stress test data is sampled when the indicator value of at least one performance indicator reaches a preset condition (for example, when the target server is at a high risk level).

[0101] In other embodiments, if any one of the values ​​of the at least one performance metric satisfies a preset condition, then the value of the at least one performance metric is determined to satisfy the preset sampling trigger condition. That is, if any one of the values ​​of the running performance metric, the storage performance metric, and the user performance metric satisfies the preset condition, then the preset sampling trigger condition is satisfied.

[0102] In this embodiment of the disclosure, when adaptive sampling of stress test data is performed under the condition of satisfying the preset sampling triggering condition, it can be reflected in the following two aspects.

[0103] The target server's performance metrics include at least one of the following: runtime performance metrics, storage performance metrics, and user performance metrics, and each performance metric corresponds to multiple metric data.

[0104] Therefore, in the first embodiment, the plurality of indicators includes set target indicator data, wherein the target indicator data can be one or more of the plurality of indicator data. When the indicator value of the target indicator data meets preset requirements, the stress test data is sampled according to preset sampling configuration information to obtain sampling results. That is, since the user can preset the target indicator data according to the actual situation, and perform sampling when the indicator value of a specific target indicator data meets preset requirements, adaptive sampling can be achieved.

[0105] The preset requirements can be set according to the actual situation, and different target indicator data can correspond to different preset requirements, which are not limited here.

[0106] For example, if the target metric data is memory utilization, where the memory utilization is of type increaseRate, the corresponding maximum threshold parameter range is 7 days 95%. That is, if the memory utilization exceeds 95% after the upper limit of 7 days, then the stress test data will be sampled.

[0107] In the second implementation, since each performance indicator corresponds to multiple indicator data, when any of the indicator data satisfies its corresponding data indicator threshold, the indicator value of the performance indicator corresponding to the indicator data with the corresponding data indicator threshold is determined to satisfy the preset condition. Furthermore, when the indicator value of any indicator data satisfies the data indicator threshold, the stress test data corresponding to the indicator data whose indicator value satisfies the data indicator threshold can be sampled according to the sampling configuration information to obtain the sampling result. That is, different types of sampling can be triggered according to the type of indicator data, thereby achieving adaptive sampling. Optionally, when the indicator value of any indicator data satisfies the data indicator threshold, all stress test data can also be sampled; this is not limited here.

[0108] The data indicator thresholds can be set according to the actual situation, and different target indicator data can correspond to different data indicator thresholds, which are not limited here.

[0109] For example, when the value of a performance metric drops to a specific threshold, sampling of the corresponding metric data is automatically triggered. For instance, if the threshold for the performance metric value is 80%, and the metric value is greater than 80%, then the metric data corresponding to the performance metric (e.g., peak single-core CPU utilization, average overall CPU utilization, average process CPU utilization (single thread), memory utilization, and disk utilization, etc.) are sampled.

[0110] In this embodiment of the disclosure, during the stress test, the index value of at least one performance indicator is determined based on the stress test data of the target server acquired in real time. When the index value of at least one performance indicator meets the preset sampling trigger condition, the stress test data is sampled, avoiding manual monitoring and manual sampling. In this way, while saving labor costs, real-time sampling can be performed when problems occur, thereby improving the efficiency and accuracy of monitoring.

[0111] In this embodiment of the disclosure, when using the SDK sampling mode, it is necessary to pre-set the target server's address, port number, and sampling port number. For example, please refer to [link to relevant documentation]. Figure 3 This is a schematic diagram of a sampling management interface provided in an embodiment of this disclosure, as shown below. Figure 3 As shown, users need to fill in the target server address in the management interface, which corresponds to the Host input box in the management interface; the port number, which corresponds to the Service Port input box in the management interface; and the sampling port number, which corresponds to the Debug Port in the management interface.

[0112] The following section introduces the SDK sampling mode and the Agent sampling mode.

[0113] The SDK sampling mode embeds the SDK development package in the server-side source code. This sampling method is simple in principle and accurate in terms of the number of calls.

[0114] Agent sampling mode does not require embedding the SDK in the server-side source code; sampling can be performed simply based on the sampling process ID. For example, sampling can be implemented based on the following code: ` / debug / profile? pid=11244&seconds=30&lang_type=go&profile_type=cp u`, which means sampling the CPU of the go process with process ID (pid) 11244 for 30 seconds.

[0115] It is understandable that after obtaining the sampling results, the sampling results can also be displayed. Optionally, if the stress test task targeting the target server is detected to have ended, a sampling identifier is generated based on the sampling results; in response to the sampling identifier being triggered, the sampling results are displayed.

[0116] Specifically, to facilitate user viewing and identification of issues based on sampling results, a sampling identifier can be generated after the sampling results are obtained. Then, in response to user triggering of the sampling identifier, the sampling results can be displayed and analyzed using pre-defined display tools. For example, the sampling identifier can be displayed as a Uniform Resource Locator (URL), that is, as a web link, allowing users to directly trigger the link and thus display the sampling results.

[0117] Optionally, before conducting stress testing, the flame graph visualization tool environment can be pre-configured. After obtaining the sampling results, the corresponding visualization tool can be used to display the flame graph. Specifically, when the user selects the SDK sampling mode, the pprof tool can be used to display the sampling results as a flame graph; when the user selects the agent sampling mode, the flamegraph tool can be used. This allows for a hierarchical display of the sampling results, enabling rapid identification of problem areas.

[0118] In some implementations, when sampling the stress test data according to preset sampling configuration information to obtain the sampling results, please refer to [link to relevant documentation]. Figure 4 It may include the following S1031 to S1032:

[0119] S1031, Based on the sampling configuration information, generate a sampling task and add the sampling task to the sampling queue.

[0120] S1032, when the task consumer reads the sampling task from the sampling queue, the stress test data is sampled to obtain the sampling result.

[0121] It is understood that, when the metric value under at least one performance metric meets preset conditions, a sampling task will be automatically generated based on the sampling configuration information and added to the sampling queue. The performance acquisition task consumer (collector) in the sampling service will continuously poll the sampling queue to see if there are any new sampling tasks. When a new acquisition task is detected, the collector will parse the task configuration to call the corresponding sampling interface to sample the stress test data. That is, when the metric value under at least one performance metric meets preset conditions, a sampling task is automatically generated and added to the task queue, thus enabling data sampling at the first opportunity.

[0122] Optionally, the task consumer can check whether there are sampling tasks in the sampling queue based on a preset time interval, thereby reducing the occurrence of missed sampling tasks. The preset time interval can be set according to actual needs, for example, it can be 30 seconds, 1 minute, or 5 minutes, etc., and is not limited here.

[0123] In some implementations, after obtaining the sampling results, the sampling results can be stored. In this embodiment of the disclosure, the sampling results are stored in the form of objects in a cloud storage service. An object is a basic unit in the cloud storage service, consisting of a filename (Key) and user data (Data), where the filename is a unique identifier. In other implementations, the sampling results can be stored in other ways, which are not limited here.

[0124] Optionally, while storing the sampling results, the corresponding configuration information is also stored. In this way, users can view the configuration information while querying the sampling results. That is, storing the sampling results and configuration information in a one-to-one correspondence helps users to view and identify problems.

[0125] Since this embodiment supports adaptive sampling, that is, before performing server stress testing, the user can pre-set relevant configuration information. In this way, when performing stress testing, the configuration information for stress testing the target server can be obtained, and stress testing can be performed on the target server based on the configuration information to generate the stress test data.

[0126] The configuration information includes scoring rules for each stress test data (e.g., the configuration information of the scoring range and corresponding weights for each stress test data as described above), configuration information of sampling trigger conditions (e.g., the configuration information of preset conditions, preset requirements and data indicator thresholds as described above), and configuration information of sampling mode (e.g., the sampling configuration information or sampling time configuration information that needs to be added when using the SDK sampling mode as described above).

[0127] In this way, after the user has pre-set the configuration information, the target server can be stress tested based on the configuration information to obtain stress test data, thus making the obtained stress test data more in line with the user's needs.

[0128] Please see Figure 5 The following is an execution flowchart of a pressure monitoring data monitoring method provided in this disclosure embodiment. Figure 5 This section provides a detailed explanation of the entire stress test process and the process of monitoring stress test data.

[0129] First, users configure the settings (scoring rules, sampling trigger conditions, and sampling mode) in the load testing service's configuration interface, and then start the load testing task. After the load testing task is completed, the load testing service can obtain the load testing data.

[0130] Then, based on the stress test data, the stress test data is automatically scored. This determines the target server's performance value under at least one performance metric. If the metric value meets the preset sampling trigger condition, the stress test data is automatically sampled, and a sampling task is generated and added to the task queue. The task consumer collector periodically polls the task queue. After detecting a sampling task, the collector parses the sampling configuration information corresponding to that task, then calls the corresponding sampling interface to perform sampling and obtain the sampling result. The format of the sampling result will differ depending on the sampling mode (SDK and agent). The sampling result is then stored.

[0131] After the sampling results are stored, a sampling identifier corresponding to the sampling results is generated and returned to the user. In this way, the user can obtain the sampling results and corresponding configuration information based on the sampling identifier, and display the sampling results and configuration information through display tools (such as Flamegraph or pprof).

[0132] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0133] Based on the same inventive concept, this disclosure also provides a pressure test data monitoring device corresponding to the pressure test data monitoring method. Since the principle of the device in this disclosure for solving the problem is similar to the pressure test data monitoring method described above in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0134] Please see Figure 6 This is a schematic diagram of a pressure test data monitoring device provided in an embodiment of this disclosure. The pressure test data monitoring device 600 includes: an acquisition module 610, a determination module 620, and a sampling module 630; wherein,

[0135] The acquisition module 610 is used to acquire the stress test data of the target server in real time during the stress test of the target server.

[0136] The determination module 620 is used to determine the index value of at least one performance index of the target server based on the stress test data.

[0137] The sampling module 630 is used to sample the stress test data according to preset sampling configuration information when the index value of at least one performance index of the target server meets the preset sampling trigger condition, and obtain the sampling result.

[0138] In one optional implementation, the number of performance indicators is at least two, and the determining module 620 is further configured to:

[0139] If a preset relationship is satisfied between the sum of the values ​​of at least two performance indicators and the weighted average of the values ​​of the at least two performance indicators, then the values ​​of the at least two performance indicators are determined to satisfy the preset sampling trigger condition.

[0140] In one optional implementation, each performance indicator corresponds to multiple indicator data, and each indicator data corresponds to a score and a weight; the determining module 620 is specifically used for:

[0141] For each performance metric, based on the stress test data, determine the scores and weights corresponding to the multiple metric data for that performance metric.

[0142] Based on the scores and weights corresponding to the multiple indicator data, the total score and weighted average score of each performance indicator are determined.

[0143] The index value of each performance index is obtained based on the ratio between the weighted average score and the total score.

[0144] In one optional implementation, the determining module 620 is specifically used for:

[0145] If any one of the values ​​of the at least one performance indicator satisfies a preset condition, then the value of the at least one performance indicator is determined to satisfy the preset sampling trigger condition.

[0146] In one optional implementation, each performance indicator corresponds to multiple indicator data, and the multiple indicator data includes set target indicator data; the determining module 620 is specifically used for:

[0147] If the target indicator data meets the preset requirements, the indicator value of the performance indicator corresponding to the target indicator data is determined to meet the preset conditions.

[0148] In one optional implementation, each performance indicator corresponds to multiple indicator data; the determining module 620 is specifically used for:

[0149] If any of the aforementioned indicator data satisfies its corresponding data indicator threshold, the indicator value of the performance indicator corresponding to the indicator data that satisfies its corresponding data indicator threshold is determined to satisfy the preset condition.

[0150] In one optional implementation, the performance metrics of the target server include at least one of operational performance metrics, storage performance metrics, and user performance metrics.

[0151] Please see Figure 7 This is a schematic diagram of another pressure test data monitoring device provided in this embodiment of the present disclosure. The device further includes a display module 650, which is used for:

[0152] Upon detecting the completion of the stress test task targeting the target server, a sampling identifier is generated based on the sampling results;

[0153] In response to the triggering of the sampling identifier, the sampling result is displayed.

[0154] In one optional implementation, the sampling module 630 is further specifically used for:

[0155] Based on a preset time interval, the system detects whether there are sampling tasks in the sampling queue.

[0156] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.

[0157] Based on the same technical concept, this disclosure also provides an electronic device. (See also...) Figure 8 The diagram shown is a structural schematic of an electronic device 800 provided in an embodiment of this disclosure, including a processor 801, a memory 802, and a bus 803. The memory 802 is used to store execution instructions and includes a main memory 8021 and an external memory 8022. The main memory 8021, also called internal memory, is used to temporarily store computational data in the processor 801, as well as data exchanged with external memory 8022 such as a hard disk. The processor 801 exchanges data with the external memory 8022 through the main memory 8021.

[0158] In this embodiment, the memory 802 is specifically used to store application code that executes the solution of this application, and its execution is controlled by the processor 801. That is, when the electronic device 800 is running, the processor 801 communicates with the memory 802 through the bus 803, so that the processor 801 executes the application code stored in the memory 802, thereby executing the method in any of the foregoing embodiments.

[0159] Processor 801 may be an integrated circuit chip with signal processing capabilities. The aforementioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor can be a microprocessor or any conventional processor.

[0160] The memory 802 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0161] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 800. In other embodiments of this application, the electronic device 800 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0162] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the stress test data monitoring method described in the above method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0163] This disclosure also provides a computer program product carrying program code. The program code includes instructions that can be used to execute the steps of the stress test data monitoring method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.

[0164] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0165] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and terminals described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, terminals, and methods can be implemented in other ways. The terminal embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces, or indirect coupling or communication connection between units, and may be electrical, mechanical, or other forms.

[0166] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0167] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0168] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0169] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.

Claims

1. A method of monitoring pressure test data, characterized by, The method comprises: acquiring stress test data of a target server in real time during stress testing of the target server; determining an index value of at least one performance index of the target server based on the stress test data; in a case where the index value of the at least one performance index of the target server meets a preset sampling trigger condition, sampling the stress test data according to preset sampling configuration information to obtain a sampling result.

2. The method of claim 1, wherein, The number of performance indexes is at least two, and in a case where a preset relationship is met between a sum of index values of the at least two performance indexes and a weighted average value of the index values of the at least two performance indexes, it is determined that the index values of the at least two performance indexes meet the preset sampling trigger condition.

3. The method of claim 2, wherein, Each performance index corresponds to a plurality of index data, each index data corresponds to a score and a weight, and the index value of each performance index is obtained by the following steps: for each performance index, determining the scores and weights corresponding to the plurality of index data corresponding to the performance index according to the stress test data; determining a total score and a weighted average score of each performance index based on the scores and weights corresponding to the plurality of index data; obtaining the index value of each performance index based on a ratio between the weighted average score and the total score.

4. The method of claim 1, wherein, In a case where any one of the index values of the at least one performance index meets a preset condition, it is determined that the index values of the at least one performance index meet the preset sampling trigger condition.

5. The method of claim 4, wherein, Each performance index corresponds to a plurality of index data, and the plurality of index data includes a set target index data; in a case where the target index data meets a preset requirement, it is determined that the index value of the performance index corresponding to the target index data meets the preset condition.

6. The method of claim 4, wherein, Each performance index corresponds to a plurality of index data, and in a case where any one of the index data meets a data index threshold corresponding thereto, it is determined that the index value of the performance index corresponding to the index data meeting the data index threshold meets the preset condition.

7. The method according to any one of claims 1 to 6, characterized in that, The performance indexes of the target server include at least one of a running performance index, a storage performance index, and a user performance index.

8. The method according to any one of claims 1 to 6, characterized in that, The method further comprises: in a case where it is detected that a stress test task for the target server ends, generating a sampling identifier based on the sampling result; in response to the sampling identifier being triggered, displaying the sampling result.

9. The method according to any one of claims 1 to 6, characterized in that, The sampling of the stress test data according to the preset sampling configuration information to obtain the sampling result comprises: generating a sampling task based on the sampling configuration information, and adding the sampling task to a sampling queue; in a case where a task consumer reads the sampling task from the sampling queue, sampling the stress test data to obtain the sampling result.

10. The method of claim 9, wherein, Before the sampling of the stress test data to obtain the sampling result in the case where the task consumer reads the sampling task from the sampling queue, the method further comprises: detecting, based on a preset time interval, whether there is a sampling task in the sampling queue.

11. A monitoring device for pressure test data, characterized in that The method comprises: An acquisition module is configured to acquire, in a process of performing stress testing on a target server, stress testing data of the target server in real time. A determination module is configured to determine, based on the stress testing data, an index value of at least one performance index of the target server. A sampling module is configured to, in a case where the index value of the at least one performance index of the target server meets a preset sampling trigger condition, sample the stress testing data according to preset sampling configuration information, and obtain a sampling result.

12. An electronic device, comprising: The method comprises: A processor, a memory and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, the machine readable instructions are executed by the processor to execute the stress testing data monitoring method in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to execute the stress testing data monitoring method in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Pressure testing method, device and system

    CN107015892A

  • Automatic test processing method and device

    CN113656313A