Performance test method of cloud host

By storing updated performance test files in the cloud platform's intranet mirror source, the problem of low efficiency in cloud host performance testing is solved, a faster testing process and higher efficiency are achieved, and an increase in mirror maintenance costs is avoided.

CN120763016APending Publication Date: 2025-10-10CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510823038.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

The performance testing efficiency of cloud hosts in the existing technology is low, mainly because the CPU architecture, operating system, version differences and testing tools of the cloud hosts require frequent updates of private images, resulting in high image maintenance costs.

Method used

Store updated performance test files, including application installation packages, application configuration files, and stress testing tools, in the cloud platform's intranet mirror source. Use these files to deploy applications and stress testing tools on the server-side cloud host to be tested, execute performance test scripts, and determine performance test results based on operating data and test data.

Benefits of technology

By storing the updated performance test files in the cloud platform's intranet mirror source, the image maintenance time is reduced, the performance testing efficiency is improved, and the problem of inconsistent test environment is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120763016A_ABST
    Figure CN120763016A_ABST
Patent Text Reader

Abstract

The invention relates to a cloud host performance test method. The method comprises the following steps: deploying a to-be-tested application program on a to-be-tested server cloud host based on an application installation package and an application configuration file downloaded from an intranet mirror image source of a cloud platform; and based on a pressure test tool installation package and a performance test script downloaded from the cloud platform intranet mirror image source, deploying a pressure test tool on a client cloud host corresponding to the to-be-tested server cloud host, an updated performance test file is stored in the cloud platform intranet mirror image source, and the updated performance test file at least comprises an application installation package, an application configuration file and a pressure test tool; controlling the operation of the to-be-tested application program in the to-be-tested server cloud host by executing the performance test script in the pressure test tool; and determining a performance test result of the to-be-tested server cloud host according to the collected operation data of the to-be-tested application program and the test data of the client cloud host. By adopting the method, the performance test efficiency of the cloud host can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of performance testing, and in particular to a performance testing method for a cloud host. Background Art

[0002] As competition in the cloud computing market becomes increasingly fierce, performance testing is also a key means for cloud service providers to enhance their competitiveness.

[0003] Related technologies require pre-installing or deploying application and performance testing tool installation packages on a cloud host during testing, creating a private image. This private image is then used to create a cloud host for performance testing. However, in practice, cloud hosts often face updates to their central processing unit (CPU) architecture, operating system, version differences, applications, and testing tools. This necessitates frequent updates to private images, significantly increasing maintenance costs and leading to lower performance testing efficiency for cloud hosts. Summary of the Invention

[0004] Based on this, it is necessary to provide a performance testing method for a cloud host to address the above technical issues, which can improve the performance testing efficiency of the cloud host.

[0005] In a first aspect, the present application provides a performance testing method for a cloud host, comprising:

[0006] In a case where a server-side cloud host to be tested exists in a resource pool, the application to be tested is deployed on the server-side cloud host to be tested based on the application installation package and application configuration file downloaded from the cloud platform intranet mirror source; and the stress testing tool is deployed on the client cloud host corresponding to the server-side cloud host to be tested based on the stress testing tool installation package and performance testing script downloaded from the cloud platform intranet mirror source; the stress testing tool includes the performance testing script; wherein the cloud platform intranet mirror source stores an updated performance testing file, and the updated performance testing file includes at least the application installation package, the application configuration file, and the stress testing tool;

[0007] Control the operation of the application under test in the server-side cloud host by executing the performance test script in the stress testing tool;

[0008] The performance test results of the server-side cloud host to be tested are determined based on the collected running data of the application to be tested and the test data of the client cloud host.

[0009] In one embodiment, determining a performance test result of a server-side cloud host to be tested based on collected running data of the application to be tested and test data of the client-side cloud host includes:

[0010] Fitting the collected test data of the client cloud host to obtain a performance test curve chart; and fitting the collected running data of the application to be tested to obtain a performance collection curve chart;

[0011] Based on the performance test curve and performance collection curve, determine the performance test results of the server-side cloud host to be tested.

[0012] In one embodiment, determining a performance test result of a server-side cloud host to be tested based on a performance test curve graph and a performance collection curve graph includes:

[0013] Obtain the service system information of the server cloud host to be tested and the customer system information of the client cloud host;

[0014] The service system information, customer system information, performance test curve chart and performance collection curve chart are summarized to obtain the performance test results of the server-side cloud host to be tested.

[0015] In one embodiment, the method further comprises:

[0016] Obtain the performance test progress and performance test time of the client cloud host during the execution of the performance test script;

[0017] According to the performance test process and performance test time, determine the end conditions of the collection process of the server cloud host to be tested and the test process of the client cloud host.

[0018] In one embodiment, the termination conditions of the collection process of the server cloud host to be tested and the test process of the client cloud host include any of the following situations:

[0019] The performance test process is complete and the performance test time reaches the preset test duration;

[0020] The performance test process is complete, and the performance test time has not reached the preset test time. After waiting for at least one preset time, the performance test time reaches the preset test time.

[0021] The performance testing process is incomplete.

[0022] In one embodiment, the method further comprises:

[0023] Based on the test parameters corresponding to the test business, determine whether a cloud host needs to be created in the resource pool;

[0024] If you need to create cloud hosts in the resource pool, create the same number of server cloud hosts as the difference between the number of server cloud hosts in the test parameters and the number of existing server cloud hosts in the resource pool, and update the address list of existing server cloud hosts in the resource pool.

[0025] And, according to the difference between the number of client cloud hosts in the test parameters and the number of existing client cloud hosts in the resource pool, the same number of client cloud hosts as the difference is created, and the address list of the existing client cloud hosts in the resource pool is updated.

[0026] In one of the embodiments, the method further comprises:

[0027] Based on the number of client cloud hosts in the resource pool, the type of test service is determined.

[0028] If the test service is the first type of service, the address list of the existing server cloud hosts in the resource pool is assigned to the address list of the existing client cloud hosts.

[0029] If the test service is the second type of service, an interaction path between the client cloud host and the to-be-tested server cloud host is established.

[0030] In one of the embodiments, the establishment of the interaction path between the client cloud host and the to-be-tested server cloud host comprises:

[0031] The public and private keys are downloaded from the cloud platform internal network image source, and the password-free login between the to-be-tested server cloud host and the client cloud host is configured.

[0032] The security rules for the client cloud host to access the corresponding server cloud host are configured to establish the interaction path between the to-be-tested server cloud host and the client cloud host.

[0033] In one of the embodiments, the method further comprises:

[0034] The test parameters corresponding to the test service are checked, and it is determined whether the resource remaining amount of the resource pool meets the creation requirement of the cloud host.

[0035] In the case that the test parameter verification is passed and the resource remaining amount meets the creation requirement of the cloud host, the step of determining whether the cloud host needs to be created in the resource pool of the cloud platform is executed.

[0036] In one of the embodiments, the method further comprises:

[0037] In the case that the performance test is in the ending state, the cloud host resources, network resources and user resources, and performance test files generated in the performance test process are cleaned up to obtain a target resource pool.

[0038] In a second aspect, the application further provides a performance test device of a cloud host, comprising:

[0039] A deployment module is configured to deploy the application under test on the server-side cloud host under test based on the application installation package and application configuration file downloaded from the cloud platform intranet mirror source, if the server-side cloud host under test exists in the resource pool; and to deploy the stress testing tool on the client cloud host corresponding to the server-side cloud host under test based on the stress testing tool installation package and performance testing script downloaded from the cloud platform intranet mirror source; the stress testing tool includes the performance testing script; wherein the cloud platform intranet mirror source stores an updated performance testing file, and the updated performance testing file includes at least the application installation package, the application configuration file, and the stress testing tool;

[0040] The execution module is used to control the operation of the application under test in the cloud host of the server under test by executing the performance test script in the stress testing tool;

[0041] The determination module is used to determine the performance test result of the server-side cloud host to be tested based on the collected running data of the application to be tested and the test data of the client cloud host.

[0042] In a third aspect, the present application further provides a controller comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the content of any one embodiment of the performance testing method for the cloud host in the first aspect mentioned above is implemented.

[0043] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the contents of any one embodiment of the performance testing method for the cloud host in the first aspect above.

[0044] In a fifth aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the content of any embodiment of the performance testing method for the cloud host in the first aspect above.

[0045] The above-mentioned performance testing method for the cloud host is, when there is a server-side cloud host to be tested in the resource pool, deploying the application to be tested on the server-side cloud host to be tested based on the application installation package and application configuration file downloaded from the cloud platform intranet mirror source; and deploying the stress testing tool on the client cloud host corresponding to the server-side cloud host to be tested based on the stress testing tool installation package and performance testing script downloaded from the cloud platform intranet mirror source; the stress testing tool includes a performance testing script; wherein the cloud platform intranet mirror source stores an updated performance testing file, and the updated performance testing file includes at least an application installation package, an application configuration file and a stress testing tool; controlling the operation of the application to be tested in the server-side cloud host to be tested by executing the performance testing script in the stress testing tool; determining the performance test result of the server-side cloud host to be tested based on the collected operation data of the application to be tested and the test data of the client cloud host. This method stores the updated performance test files in the cloud platform's intranet mirror source. When a performance test is needed on the server-side cloud host to be tested in the resource pool, it only needs to be downloaded synchronously from the cloud platform's intranet mirror source. This avoids the problem of increased image maintenance costs caused by the need to update private images in multiple resource pools separately due to the update process. This reduces the time for image maintenance and makes the overall performance testing process faster, thereby improving the efficiency of performance testing. At the same time, because the updated performance test files are stored in advance in the cloud platform's intranet mirror source, they can be downloaded using the local area network within the cloud platform, and the problem of inconsistent test environments will not occur. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a diagram of an application environment of a performance testing method for a cloud host in one embodiment;

[0047] Figure 2 A schematic diagram of a first flow chart of a method for performance testing a cloud host in one embodiment;

[0048] Figure 3 A second flow chart of a method for testing the performance of a cloud host in one embodiment;

[0049] Figure 4 1 is a schematic diagram of a third flow chart of a method for testing the performance of a cloud host in one embodiment;

[0050] Figure 5 1 is a fourth flow chart of a method for testing the performance of a cloud host in one embodiment;

[0051] Figure 6 1 is a fifth flow chart of a method for testing the performance of a cloud host in one embodiment;

[0052] Figure 7 6 is a schematic diagram of a sixth flow chart of a method for testing the performance of a cloud host in one embodiment;

[0053] Figure 8 7 is a schematic diagram of a seventh flow chart of a method for testing the performance of a cloud host in one embodiment;

[0054] Figure 9 8 is a schematic diagram of an eighth flow chart of a method for testing the performance of a cloud host in one embodiment;

[0055] Figure 10 1 is a ninth flow chart of a method for testing the performance of a cloud host in one embodiment;

[0056] Figure 11 10th flow chart of a method for testing the performance of a cloud host in one embodiment;

[0057] Figure 12 Schematic diagram of the process of executing the parameter verification module in one embodiment;

[0058] Figure 13 A flowchart of the execution process of a control module in one embodiment;

[0059] Figure 14 Schematic diagram of the process of executing the acquisition module in one embodiment;

[0060] Figure 15 Schematic diagram of the flow of the execution process of the observation module in one embodiment;

[0061] Figure 16 A flowchart of the execution process of a collection module in one embodiment;

[0062] Figure 17 A schematic diagram of a flow chart of a cleaning module execution process in one embodiment;

[0063] Figure 18 1 is a structural block diagram of a performance testing device for a cloud host in one embodiment. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0065] In the cloud computing era, elastic cloud hosts, as Infrastructure as a Service (IAAS), can provide the most basic computing services and are also the most important carrier for carrying user businesses.

[0066] In the related art, in the process of testing a cloud host, an application and a performance test tool installation package need to be installed or deployed in the cloud host in advance, a private image is created, and a cloud host to be tested is created through the private image to perform performance testing. However, in actual application, the CPU architecture, operating system, version difference, application, and test tool of the cloud host often need to be updated, which requires frequent updating of the private image, greatly increasing the maintenance cost of the private image and resulting in low efficiency of performance testing of the cloud host.

[0067] To solve the above technical problems, the present application provides a performance testing method of a cloud host, which can reduce the maintenance cost of the image caused by iteration update of the base image, application update and the like in the method of creating a private image with an application, and improve the efficiency of performance testing.

[0068] The performance testing method of the cloud host provided by the embodiments of the present application can be applied to an application environment as shown in Figure 1 The application environment includes a cloud platform composed of a plurality of resource pools (resource pool 1, resource pool 2, …, resource pool N in the figure) and an intranet image source of the cloud platform. For each resource pool in the cloud platform, the resource pool includes a controller and a server cloud host to be tested. The controller is used to download the required performance test files from the intranet image source of the cloud platform and perform performance testing on the server cloud host to be tested to obtain performance test results. The intranet image source of the cloud platform stores performance test files such as application installation packages, application configuration files, application deployment scripts, stress testing tool installation packages, stress testing tool deployment scripts, performance collection scripts, and performance test scripts, and can also include password-free login public and private keys and the like. It should be emphasized that the performance testing method of the cloud host is to test the cloud host in any resource pool in the cloud platform, and the performance testing process of the cloud host in different resource pools can also be performed synchronously. Figure 1 For resource pool 1, cloud host c-1 represents a client cloud host, cloud host s-1 represents a server cloud host, and cloud host c-1 and cloud host s-1 form a c-s type (Client / Server architecture). Cloud host s-2 and cloud host s-3 are single machine types. Next, the performance testing process of the cloud host in one of the resource pools will be described.

[0069] In an exemplary embodiment, as shown in Figure 2 A performance testing method of a cloud host is provided. Taking the controller in Figure 1 as an example, the method includes the following steps 101 to 103. Wherein:

[0070] S101, when there is a server-side cloud host to be tested in the resource pool, deploy the application to be tested on the server-side cloud host to be tested based on the application installation package and application configuration file downloaded from the cloud platform intranet mirror source; and, deploy the stress testing tool on the client cloud host corresponding to the server-side cloud host to be tested based on the stress testing tool installation package and performance testing script downloaded from the cloud platform intranet mirror source; the stress testing tool includes a performance testing script; wherein the cloud platform intranet mirror source stores an updated performance testing file, and the updated performance testing file includes at least the application installation package, the application configuration file and the stress testing tool.

[0071] Among them, the "application installation package" refers to a way of releasing software, which contains all the files and data required for the software to run. The application configuration file includes application configuration parameters, which are mainly used to set parameters and options. The stress testing tool installation package refers to a software package that contains all the necessary files and configurations for installing and configuring stress testing tools. Performance testing scripts are scripts built based on in-depth analysis of actual user business scenarios. In order to simulate diverse user behaviors and business data, performance testing scripts need to have parameterization capabilities. For example, for user login scenarios, the username and password in the script are not fixed values, but are randomly read from pre-prepared user information data files.

[0072] Performance testing refers to the performance indicators such as response time, throughput, stability and system scalability of the server-side cloud host to be tested in the resource pool under a certain load pressure. The purpose of performance testing the server-side cloud host to be tested is to understand the actual performance of the cloud host and provide a basis for subsequent optimization work. The server-side cloud host to be tested in the resource pool can be created in advance, or the server-side cloud host that already exists in the resource pool can be used as the server-side cloud host to be tested. The embodiment of the present application does not limit the process of determining the server-side cloud host to be tested in the resource pool.

[0073] Once the server-side cloud host under test is confirmed to exist in the resource pool, its performance can be tested to determine whether it meets factory or user requirements. During the performance test, installation and deployment are required on both the server-side cloud host under test and the corresponding client cloud host. For the server-side cloud host under test, the controller can download the application installation package and application configuration file corresponding to the server-side cloud host under test from the cloud platform's intranet mirror source via a specific download protocol, based on the application installation package and application configuration file required by the server-side cloud host under test.

[0074] After receiving the downloaded application installation package and configuration file, the controller decompresses the package according to the installation process, deploying the application on the server-side cloud host under test. The application configuration file is also correctly read and parsed, and key configuration items such as the application's operating environment, database connection information, and user permissions are initialized based on pre-set parameters, ensuring that the application under test can run normally and stably on the server-side cloud host under test.

[0075] At the same time, the stress testing tool is deployed on the client cloud host corresponding to the server cloud host under test. For the client cloud host, the controller can also deploy the stress testing tool on the client cloud host based on the stress testing tool installation package and performance test script required by the client cloud host.

[0076] For scenarios with multiple client cloud hosts and multiple server cloud hosts, for any client cloud host and the corresponding server cloud host, you need to download the corresponding application installation package, application configuration file, and stress testing tool from the cloud platform's intranet image source, deploy the application to be tested on the client cloud host, and deploy the stress testing tool on the corresponding server cloud host.

[0077] S102 , controlling the operation of the application program to be tested in the cloud host of the server to be tested by executing a performance test script in a stress testing tool.

[0078] In an embodiment of the present application, after the server-side cloud host and client-side cloud host to be tested are deployed, the controller can load a performance test script onto the client-side cloud host. Based on the performance test script format, the controller invokes a corresponding parsing engine within the stress testing tool to parse the performance test script, converting the instructions, parameterized settings, and transaction definitions within the performance test script into internally recognizable data structures. The controller can then execute the performance test script through the stress testing tool's thread management mechanism to achieve concurrent simulation of user operations.

[0079] When a thread in a performance test script executes a simulated user request during the stress testing tool's execution, the tool constructs a corresponding request packet based on the request protocol defined in the script and sends it to the designated port of the server-side cloud host under test. After the server-side cloud host receives the request, the application under test processes it and returns a response packet.

[0080] S103: Determine the performance test result of the server-side cloud host to be tested based on the collected running data of the application to be tested and the test data of the client-side cloud host.

[0081] In an embodiment of the present application, after the test is completed and the running data of the application to be tested and the test data of the client cloud host are obtained, the controller can analyze the running data, test data, and the associated data of the running data and test data respectively, and use the analysis results of the three, the running data and the test data as the performance test results of the server cloud host to be tested.

[0082] Specifically, response metrics and error rate analysis are key indicators for the application's operational data. Regarding response metrics, the controller performs statistical analysis on the operational data, calculating the average, maximum, and minimum response times of the application under test. These three response times serve as response metrics. Furthermore, the controller collects statistics on various errors encountered during performance testing and calculates the error rate. By comprehensively considering the response metrics and error rate, the performance of the application under test during operation is analyzed.

[0083] For the test data of the client cloud host, CPU usage, resource utilization, memory occupancy, and request success rate can all reflect the stability of the performance test environment. For example, if the CPU usage of the client cloud host continues to remain above 80% during the test, it means that the load of simulated user operations is too high, exceeding the processing capacity of the client cloud host, resulting in delays or failures in sending some requests, thereby affecting the accurate evaluation of the performance of the server cloud host under test. Similarly, for network bandwidth consumption, if the network bandwidth reaches saturation and packet loss occurs during high-concurrency testing, this will directly affect the integrity of the server cloud host under test in receiving requests and returning responses, causing deviations in the performance test results based on this data. If the request success rate is lower than 80%, it may be that some requests are lost due to network problems, or it may be that the server cloud host under test is unable to process all requests in a timely manner under high load and returns an error response.

[0084] For correlation between operational and test data, predicting the performance trend of the server-side cloud host under test is a key indicator. Based on the operational data of the application under test and the test data of the client cloud host, the controller can predict the performance trend of the server-side cloud host under test under the assumption of future business growth.

[0085] In the above performance testing method, when there is a server-side cloud host to be tested in the resource pool, the application to be tested is deployed on the server-side cloud host to be tested based on the application installation package and application configuration file downloaded from the cloud platform intranet mirror source; and, based on the stress testing tool installation package and performance testing script downloaded from the cloud platform intranet mirror source, the stress testing tool is deployed on the client cloud host corresponding to the server-side cloud host to be tested; the stress testing tool includes a performance testing script; wherein, the cloud platform intranet mirror source stores an updated performance testing file, and the updated performance testing file includes at least an application installation package, an application configuration file and a stress testing tool; the operation of the application to be tested in the server-side cloud host to be tested is controlled by executing the performance testing script in the stress testing tool; and the performance test result of the server-side cloud host to be tested is determined based on the collected operation data of the application to be tested and the test data of the client cloud host. This method stores the updated performance test files in the cloud platform's intranet mirror source. When a performance test is needed on the server-side cloud host to be tested in the resource pool, it only needs to be downloaded synchronously from the cloud platform's intranet mirror source. This avoids the problem of increased image maintenance costs caused by the need to update private images in multiple resource pools separately due to the update process. This reduces the time for image maintenance and makes the overall performance testing process faster, thereby improving the efficiency of performance testing. At the same time, because the updated performance test files are stored in advance in the cloud platform's intranet mirror source, they can be downloaded using the local area network within the cloud platform, and the problem of inconsistent test environments will not occur.

[0086] Next, the specific content of determining the performance test result of the server-side cloud host to be tested based on the collected running data of the application to be tested and the test data of the client cloud host is introduced through an embodiment. Figure 3 As shown, the specific content includes:

[0087] S201 , fitting the collected test data of the client cloud host to obtain a performance test curve; and fitting the collected running data of the application to be tested to obtain a performance collection curve.

[0088] When the client cloud host executes the performance test script to control the operation of the application program under test in the server cloud host under test, the controller can simultaneously collect the test data of the client cloud host and the operation data of the application program under test.

[0089] After collecting test data from the client cloud server, the controller can select an appropriate curve fitting algorithm to fit the test data, generating a performance test curve chart showing the test data changing over time. For example, the curve fitting algorithm can be a least squares method, a polynomial fitting algorithm, or a linear regression fitting algorithm. Alternatively, the controller can calculate the maximum, minimum, mean, 99th percentile, and sum of the test data, and perform a curve fitting based on these values ​​to generate a performance test curve chart.

[0090] Similarly, after collecting the operating data of the application under test on the server-side cloud host under test, the controller can fit the operating data using a corresponding curve fitting algorithm to obtain a performance collection curve chart showing the operating data changing over time. Alternatively, the controller can calculate the maximum, minimum, mean, 99th percentile, and sum of the operating data and perform fitting based on the maximum, minimum, mean, 99th percentile, and sum to obtain a performance collection curve chart.

[0091] S202: Determine the performance test result of the server-side cloud host to be tested based on the performance test curve chart and the performance collection curve chart.

[0092] In an embodiment of the present application, after obtaining the performance test curve graph and the performance collection curve graph, the controller can directly use the performance test curve graph and the performance collection curve graph as the performance test results of the server-side cloud host to be tested. Alternatively, the performance test curve graph and the performance collection curve graph can be analyzed to form a textual analysis result, and the obtained textual analysis result, the performance test curve graph and the performance collection curve graph can all be used as the performance test results of the server-side cloud host to be tested. Alternatively, the performance test curve graph, the client system information of the client cloud host, the performance collection curve graph and the service system information of the server-side cloud host to be tested can be summarized, and the summarized information can be used as the performance test result of the server-side cloud host to be tested.

[0093] In one embodiment, Figure 4 As shown, the specific contents of determining the performance test results of the server-side cloud host to be tested based on the performance test curve chart and the performance collection curve chart include:

[0094] S301, obtaining service system information of the server cloud host to be tested and client system information of the client cloud host.

[0095] The service system information may include kernel information, peripheral component interconnect (PCI) information, and CPU model of the server-side cloud host under test, etc. The client system information may include kernel information, PCI information, and CPU model of the client-side cloud host, etc.

[0096] In an embodiment of the present application, for a server-side cloud host under test, the controller can collect information such as the kernel information, PCI information, and CPU model of the server-side cloud host under test through the interface of the server-side cloud host under test, and use this information as the service system information of the server-side cloud host under test. For a client cloud host, the controller can collect information such as the kernel information, PCI information, and CPU model of the client cloud host through the interface of the client cloud host, and use this information as the client system information of the client cloud host.

[0097] S302 , summarizing the service system information, the client system information, the performance test curve chart, and the performance collection curve chart to obtain the performance test result of the server-side cloud host to be tested.

[0098] In an embodiment of the present application, the controller determines whether the performance test of the server-side cloud host to be tested has passed by analyzing the performance test curve chart and the performance collection curve chart. If passed, the summary results of the service system information, customer system information, performance test curve chart and performance collection curve chart are used as the performance test results of the server-side cloud host to be tested. If not passed, the reasons for the failure of the server-side cloud host to be tested are analyzed based on the summary results of the service system information, customer system information, performance test curve chart and performance collection curve chart, and the reasons for the failure and the summary results are used as the performance test results of the server-side cloud host to be tested. The performance test data and system information are integrated in a summary manner, so that the performance test results of the server-side cloud host to be tested can fully record the content of the performance test process, which is convenient for later performance monitoring and comparison.

[0099] In the above-mentioned performance testing method, the collected test data of the client cloud host is fitted to obtain a performance test curve graph; and the collected running data of the application to be tested is fitted to obtain a performance collection curve graph; based on the performance test curve graph and the performance collection curve graph, the performance test results of the server-side cloud host to be tested are determined. This method generates a performance test curve graph and a performance collection curve graph by fitting the test data of the client cloud host and the running data of the application to be tested, respectively, transforming the originally complex and disordered discrete data into an intuitive and visual graphical display. In addition, determining the performance test results of the server-side cloud host to be tested based on the fitted curve graph can more comprehensively and accurately grasp the performance status of the server-side cloud host.

[0100] During the performance test, it is very important to determine whether the performance test process has reached the end condition. Figure 5 As shown, the specific process of determining whether the performance test process has reached the end condition includes:

[0101] S401, obtaining the performance test progress and performance test time of the client cloud host during the execution of the performance test script.

[0102] The performance test process refers to the progress of the performance test process. The performance test process of the client cloud host is stored in a dictionary (c_map) whose key (‌Key) is the cloud host address.

[0103] In an embodiment of the present application, the controller can utilize process management tools and interfaces to monitor the real-time status of the process executing the performance test script on the client cloud host to obtain the performance test progress. Alternatively, a logging function can be added to the performance test script. In this way, during the performance test process, the execution steps of the script can be tracked in detail, and the execution time, execution results, and related parameter information of each execution step can be recorded to obtain the performance test progress of the performance test script process.

[0104] At the same time, when the controller starts the performance test script on the client cloud host, it can start recording through the timestamp function to obtain the start timestamp and end timestamp of each execution step.

[0105] S402 , determining the end conditions of the collection process of the server cloud host to be tested and the test process of the client cloud host according to the performance test process and the performance test time.

[0106] In the actual performance testing process, it is necessary to comprehensively consider the performance test process and performance test time to determine a more reasonable end condition. That is, in the test process of the client cloud host, it is necessary to pay attention to the execution progress and error rate of the script, and also consider the total duration of the test. Specifically, the controller can compare the length of c_map with the length of the existing client cloud host address list. If the two are the same, it is determined that the performance test process is completed; if the two are different, it is determined that the performance test process is not completed. Afterwards, the performance test time is compared with the preset test duration to determine whether the performance test time has reached the set time before the test. Based on the above two judgment results, the end conditions of the acquisition process of the server cloud host to be tested and the test process of the client cloud host are determined.

[0107] Specifically, in one embodiment, the termination conditions of the collection process of the server cloud host to be tested and the test process of the client cloud host include any one of the following situations: the performance test process is complete, and the performance test time reaches the preset test duration; the performance test process is complete, and the performance test time does not reach the preset test duration, and the performance test time reaches the preset test duration after waiting for at least one preset duration; the performance test process is incomplete.

[0108] In the above three cases, the test process of the server-side cloud host under test is terminated; and when the test process is in the end state, the collection process of the client cloud host is terminated. In other words, there is a time sequence between the termination process of the server-side cloud host under test and the termination process of the client cloud host.

[0109] Since cloud hosts consume a significant amount of system resources during performance testing, to ensure these resources do not occupy space in the resource pool after the performance test, it is necessary to ensure that no processes exist on the server-side cloud host or client-side cloud host. Therefore, the controller must stop both the acquisition process on the server-side cloud host and the test process on the client-side cloud host, and then confirm whether all processes on the server-side cloud host and client-side cloud host exist. If none exist, the process confirmation is considered successful. If at least one process exists, the process confirmation is considered a failure.

[0110] In the above performance testing method, the performance test progress and performance test time of the client cloud host during the execution of the performance test script are obtained; based on the performance test progress and performance test time, the termination conditions of the collection process of the server cloud host under test and the test process of the client cloud host are determined. By obtaining the performance test progress of the client cloud host during the execution of the performance test script, this method can provide a real-time and detailed understanding of the actual progress of the performance test, ensuring that the performance test is carried out according to the expected logic and process, thereby improving the accuracy of the performance test results.

[0111] Before performing a performance test on the server-side cloud host to be tested, a cloud host corresponding to the test service must exist in the corresponding resource pool. Figure 6 As shown, the methods for determining cloud hosts based on test services include:

[0112] S501: Based on the test parameters corresponding to the test business, determine whether it is necessary to create a cloud host in the resource pool.

[0113] The test service refers to a service requiring a cloud host to provide a service, which can be a common service of a user or a service with high demand of the user. The test parameter can include an application test parameter, a system test parameter, and other test parameters. The application test parameter corresponding to the test service includes demand information of the test service for the cloud host, and the application test parameter corresponding to different types of test services is different. For example, when the test service is of a c-s type, the application test parameter can include a number of server-side cloud hosts, a server-side cloud host address list, a number of client-side cloud hosts, a client-side cloud host address list, a test tool, a test application, an application test parameter, a server-side cloud host rule, and a client-side cloud host specification. When the test service is a single-machine application, the test parameter can include a number of server-side cloud hosts, a number of client-side cloud hosts, a client-side cloud host address list, a server-side cloud host address list, a test tool, and a server-side cloud host specification. The system test parameter can be a preset test duration and a collection script. For example, the preset test duration can be 3600 seconds (s).

[0114] In the embodiment of the present application, the controller can find the number of cloud hosts in the test parameter from the test parameter corresponding to the test service, and compare the number of cloud hosts in the test parameter with the number of existing cloud hosts in the resource pool to obtain a comparison result. If the comparison result is that the number of server-side cloud hosts in the test parameter is greater than the number of existing server-side cloud hosts in the resource pool, it is determined that cloud hosts need to be created in the resource pool. If the comparison result is that the number of server-side cloud hosts in the test parameter is equal to or less than the number of existing server-side cloud hosts in the resource pool, it is determined that cloud hosts do not need to be created in the resource pool.

[0115] S502, if cloud hosts need to be created in the resource pool, a number of server-side cloud hosts equal to a difference between the number of server-side cloud hosts in the test parameter and the number of existing server-side cloud hosts in the resource pool is created, and an existing server-side cloud host address list in the resource pool is updated. A number of client-side cloud hosts equal to a difference between the number of client-side cloud hosts in the test parameter and the number of existing client-side cloud hosts in the resource pool is created, and an existing client-side cloud host address list in the resource pool is updated.

[0116] The existing server-side cloud host address list represents a set of address information of the existing server-side cloud host in the resource pool, which can be represented by s_list. The existing client-side cloud host address list represents a set of address information of the existing client-side cloud host in the resource pool, which can be represented by c_list.

[0117] Specifically, when it is determined that cloud hosts need to be created in the resource pool, the cloud hosts include client cloud hosts and server cloud hosts. For the client cloud hosts, the controller can calculate the difference between the number of client cloud hosts in the test parameters and the number of existing client cloud hosts in the resource pool, and take the difference as the number of client cloud hosts to be created. The client cloud hosts are created in the resource pool according to the number, and the address list of the existing client cloud hosts in the resource pool is updated.

[0118] For the server cloud hosts, the controller can calculate the difference between the number of server cloud hosts in the test parameters and the number of existing server cloud hosts in the resource pool, and take the difference as the number of server cloud hosts to be created. The server cloud hosts are created in the resource pool according to the number, and the address list of the existing server cloud hosts in the resource pool is updated.

[0119] In the performance test method, based on the test parameters corresponding to the test business, it is determined whether cloud hosts need to be created in the resource pool; if cloud hosts need to be created in the resource pool, the number of server cloud hosts in the test parameters and the number of existing server cloud hosts in the resource pool are compared, and the same number of server cloud hosts as the difference is created, and the number of server cloud hosts in the test parameters is updated; and the number of client cloud hosts in the test parameters and the number of existing client cloud hosts in the resource pool are compared, and the same number of client cloud hosts as the difference is created, and the number of client cloud hosts in the test parameters is updated. When determining whether to create cloud hosts and determining the number of cloud hosts to be created, the method fully considers the number of existing cloud hosts in the resource pool, effectively avoiding resource waste caused by excessive creation of cloud hosts. According to the difference between the number of server and client cloud hosts in the test parameters and the existing number, the cloud hosts are created, and the number information in the test parameters is updated, so that the resource allocation is more in line with the actual needs of the test business.

[0120] After the to-be-tested server cloud hosts and client cloud hosts are created in the resource pool, the connection between them needs to be established. Then, in an embodiment, as shown in Figure 7 the method further includes:

[0121] S601, determining the type of the test business based on the number of client cloud hosts in the resource pool.

[0122] The type of the test business includes a c-s type (including server cloud hosts and client cloud hosts) business, a single machine type (including server cloud hosts) business, and the like.

[0123] In an embodiment of the present application, the controller can identify the number of client cloud hosts in the resource pool and determine whether the number of client cloud hosts is zero. Based on the determination result of the client cloud hosts, the type of the test service is determined. Specifically, if the determination result of the client cloud hosts is zero, the type of the test service is determined to be a stand-alone type service, i.e., a first type service. If the determination result of the client cloud hosts is not zero, the type of the test service is determined to be a CS type service, i.e., a second type service.

[0124] S602: If the test service is a first type of service, the existing server cloud host address list in the resource pool is assigned to the existing client cloud host address list.

[0125] The first type of service refers to a stand-alone service.

[0126] In this embodiment of the present application, when the test service type is determined to be the first type of service, this indicates that the test service type does not include client cloud hosts, but only server cloud hosts. In this case, to facilitate subsequent testing, it is necessary to establish the same number of client cloud hosts as server cloud hosts. Specifically, the existing server cloud host address list in the resource pool is assigned to the existing client cloud host address list. This ensures that the number of server cloud hosts is the same as the number of client cloud hosts.

[0127] S603: If the test service is a second type of service, an interactive path is established between the client cloud host and the server cloud host to be tested.

[0128] The second type of service refers to the cs type of service.

[0129] In this embodiment of the present application, if the test service type is determined to be the second type of service, this indicates that the test service type includes both the server cloud host and the client cloud host. In this case, the controller must establish an interactive path between the client cloud host and the server cloud host under test by using methods such as password-free login, security group policy configuration, and application deployment to enable the client cloud host to access the server cloud host.

[0130] Next, the specific process of establishing an interactive path between the client cloud host and the server cloud host to be tested is introduced through an embodiment. Figure 8 As shown, the method includes:

[0131] S701, download the public and private keys from the cloud platform intranet mirror source, and configure the password-free login between the server cloud host to be tested and the client cloud host.

[0132] In an embodiment of the present application, the cloud platform intranet mirror source stores various types of files according to a specific directory structure, and the public and private key files are placed in a special key storage directory. The controller can locate the public and private keys from the cloud platform intranet mirror source according to the preset file path rules, and download the public and private keys to the client cloud host. The client cloud host is controlled to use a secure file transfer protocol to upload the downloaded private key file from the client cloud host to the server cloud host to be tested. And the public key content is added to the storage file of the server cloud host to be tested. Afterwards, the address of the server cloud host to be tested, the user account with operation authority, and the private key file path for password-free login are configured on the client cloud host. If the password-free login is configured correctly, you can log in to the server cloud host to be tested without entering a password on the client cloud host, completing the password-free login configuration.

[0133] S702: Configure security rules for the client cloud host to access the corresponding server cloud host, so as to establish an interactive path between the server cloud host to be tested and the client cloud host.

[0134] Before configuring security rules between the client cloud host and the server cloud host, you need to obtain the data type and corresponding network protocol that need to be transmitted between the client cloud host and the server cloud host during the performance test.

[0135] In an embodiment of the present application, the controller can create a new security group or use an existing security group, enter the rule editing interface, and use the command line tool to configure inbound rules, authorization type, port range, and outbound rules, etc., to complete the interaction path between the server cloud host to be tested and the client cloud host.

[0136] After configuration is complete, you can use the network test tool on the client cloud host to test the network connectivity with the server cloud host under test. If connectivity is established, the communication path between the server cloud host under test and the client cloud host has been successfully established. If connectivity is not established, the communication path between the server cloud host under test and the client cloud host has failed.

[0137] In the above performance testing method, public and private keys are downloaded from the cloud platform's intranet mirror source, and password-free login is configured between the server-side cloud host under test and the client cloud host. Security rules for accessing the corresponding server-side cloud host by the client cloud host are configured to establish an interactive path between the server-side cloud host under test and the client cloud host. This method utilizes public and private keys downloaded from the cloud platform's intranet mirror source for password-free login. The public key is used to encrypt the login request, and only the matching private key can decrypt it. This asymmetric encryption method offers high security. Furthermore, by configuring security rules for accessing the corresponding server-side cloud host by the client cloud host, network access between cloud hosts can be precisely controlled according to the actual needs of the performance test.

[0138] In this performance testing method, the type of service under test is determined based on the number of client cloud hosts in the resource pool. If the service under test is of the first type, the existing server cloud host address list in the resource pool is assigned to the existing client cloud host address list. If the service under test is of the second type, an interactive path is established between the client cloud host and the server cloud host under test. This method, which determines the type of service under test based on the number of client cloud hosts in the resource pool, can detect the differences in cloud host resource requirements for different service scenarios. By taking different actions for different types of test services, it significantly optimizes the allocation of test resources.

[0139] Before determining the type of test service based on the number of client cloud hosts in the resource pool, it is also necessary to verify the test parameters and check the remaining resources in the resource pool. If both conditions are met, the step of determining whether to create a cloud host in the resource pool of the cloud platform is performed. Then, in one embodiment, if Figure 9 As shown, the method further includes:

[0140] S801, verifying the test parameters corresponding to the test service; and determining whether the remaining resources in the resource pool meet the requirements for creating a cloud host.

[0141] The test parameters include application test parameters, system test parameters and other test parameters.

[0142] In an embodiment of the present application, for application test parameters, the controller can compare each application test parameter in the test business with the corresponding reasonable range to determine whether each test parameter is within the corresponding reasonable range. If it is, it means that the rationality check of the test parameter has passed; if it is not, it means that the rationality check of the test parameter has failed. At the same time, it is detected whether the value of each test parameter is empty. If the value of each test parameter is not an empty value, it is determined that the integrity check has passed; if the value of any test parameter is an empty value, it is determined that the integrity check has failed. For system test parameters, the controller can determine whether the setting of the preset test time is reasonable, and whether the acquisition script is correct.

[0143] The remaining resources of the resource pool can be CPU resources, memory resources, and storage resources. The controller can monitor the CPU usage, memory resources, and storage resources of the cloud hosts in the resource pool in real time, calculate the difference between the total number of CPU cores and the currently used number of CPU cores, and obtain the currently available number of CPU cores. Also, calculate the difference between the total memory resources and the currently used memory resources to obtain the currently available memory resources. Calculate the difference between the total storage resources and the currently used storage resources to obtain the currently available storage resources. And determine whether the currently available CPU resources, memory resources, and storage resources can be used to create a cloud host. Assuming that they can be created, determine whether the remaining resources of the resource pool meet the requirements for creating a cloud host; otherwise, the remaining resources of the resource pool do not meet the requirements for creating a cloud host.

[0144] S802: When the test parameter verification passes and the remaining resources meet the requirements for creating a cloud host, a step of determining whether a cloud host needs to be created in the resource pool of the cloud platform is executed.

[0145] In an embodiment of the present application, when it is determined that the test parameter verification has passed and the remaining resources meet the requirements for creating a cloud host, a cloud host can be created in the resource pool, or an existing cloud host in the resource pool can be used.

[0146] In the above performance testing method, the test parameters corresponding to the test business are verified; and based on whether the remaining resources in the resource pool meet the requirements for creating a cloud host, the step of determining whether a cloud host needs to be created in the cloud platform's resource pool is executed. By verifying the test parameters and monitoring the remaining resources in the resource pool, this method can avoid additional costs caused by factors such as resource waste and retesting due to test failures, and can significantly reduce the risk of test failure.

[0147] During the performance test, a certain amount of resources are often occupied in the resource pool. In order to avoid idle resources and waste, it is necessary to clean up after the performance test is completed. The following example illustrates the cleaning process, which includes:

[0148] When the performance test is in the final state, the cloud host resources, network resources, user resources, and performance test files generated during the performance test are cleaned up to obtain the target resource pool.

[0149] In an embodiment of the present application, when the performance test is in the end state, the controller can clean up all files and resources generated during the performance test, so that the resource pool is restored to the state before the performance test, that is, the target resource pool.

[0150] In the aforementioned performance testing method, when the performance test is concluded, the cloud host resources, network resources, user resources, and performance test files generated during the performance test are cleaned up to obtain a target resource pool. After the performance test is completed, this method can clean up the related files occupying the resource pool memory, allowing the resource pool to quickly release the resources occupied by the related files and avoid idle resources.

[0151] In a specific embodiment, Figure 10 As shown, the performance testing method of the above cloud host includes:

[0152] S901, verifying the test parameters corresponding to the test business; and determining whether the remaining resources in the resource pool meet the requirements for creating a cloud host;

[0153] S902: If the test parameter verification passes and the remaining resources meet the cloud host creation requirements, determine whether to create a cloud host in the resource pool based on the test parameters corresponding to the test business;

[0154] S903: If cloud hosts need to be created in the resource pool, based on the difference between the number of server cloud hosts in the test parameters and the number of existing server cloud hosts in the resource pool, create a number of server cloud hosts equal to the difference, and update the list of existing server cloud host addresses in the resource pool; and based on the difference between the number of client cloud hosts in the test parameters and the number of existing client cloud hosts in the resource pool, create a number of client cloud hosts equal to the difference, and update the list of existing client cloud host addresses in the resource pool;

[0155] S904, determining the type of the test service based on the number of client cloud hosts in the resource pool;

[0156] S905: If the test service is a first type service, assign the existing server cloud host address list in the resource pool to the existing client cloud host address list;

[0157] S906: If the test service is a second type service, download the public and private keys from the cloud platform intranet mirror source and configure password-free login between the server cloud host to be tested and the client cloud host;

[0158] S907, configuring security rules for the client cloud host to access the corresponding server cloud host to establish an interactive path between the server cloud host to be tested and the client cloud host;

[0159] S908, deploying the application to be tested on the server-side cloud host based on the application installation package and application configuration file downloaded from the cloud platform intranet mirror source; and deploying the stress testing tool on the client cloud host corresponding to the server-side cloud host to be tested based on the stress testing tool installation package and performance test script downloaded from the cloud platform intranet mirror source;

[0160] S909, controlling the operation of the application under test in the cloud host of the server under test by executing a performance test script in the stress testing tool;

[0161] S910, fitting the collected test data of the client cloud host to obtain a performance test curve graph; and fitting the collected running data of the application to be tested to obtain a performance collection curve graph;

[0162] S911, obtaining service system information of the server cloud host to be tested and client system information of the client cloud host;

[0163] S912: Summarize the service system information, the client system information, the performance test curve chart, and the performance collection curve chart to obtain a performance test result of the server-side cloud host to be tested.

[0164] Figure 11A flowchart of a performance test method for a cloud host divides the performance test process of a controller in a resource pool into the execution processes of multiple modules, including a parameter verification module, a control module, a collection module, an observation module, a collection module, and a cleaning module. In the performance test process of the cloud host, the specific test process includes the contents of S11-S17. S11: Perform an initialization operation on the performance test system where the controller is located; S12: Determine whether the execution process of the parameter verification module is successful, which is mainly used for verifying the rationality and completeness of the test parameters corresponding to the test service, and determining whether the resource remaining amount of the resource pool meets the creation requirement of the cloud host. S13: If the parameter verification module passes the execution, determine whether the execution process of the control module is successful, which is mainly used for creating the cloud host and performing the performance test process of the cloud host. S14: If the control module passes the execution, determine whether the execution process of the collection module is successful, which is mainly used for collecting the running data of the to-be-tested application program and the test data of the client cloud host in the performance test process. S15: If the collection module passes the execution, determine whether the execution process of the observation module is successful, which is mainly used for determining the end condition of the test process according to whether the performance test process exists and whether the performance test time reaches the preset time. S16: If the observation module passes the execution, determine whether the execution process of the collection module is successful, which is mainly used for generating the performance test result of the to-be-tested server cloud host. S17: If the collection module passes the execution, or any one of the parameter verification module, the control module, the collection module, the observation module, and the collection module fails the execution, execute the cleaning module to clean up the related files of the performance test process.

[0165] Figure 12 A flowchart of the execution process of the parameter verification module includes: S21: Verify whether the application test parameters are successful, if yes, execute step S22; if no, execute step S25; S22: Verify whether the system test parameters are successful, if yes, execute step S23; if no, execute step S25; S23: Determine whether the resource remaining amount of the resource pool meets the creation of the cloud host, if yes, execute step S24; if no, execute step S25; S24: The parameter verification module passes the execution; S25: The parameter verification module fails the execution.

[0166] Figure 13: It is a flow chart of the control module execution process, which includes: S31: creating basic information such as users and networks required for the test business; S32: judging whether the difference between the number of server-side cloud hosts in the test parameters and the number of existing server-side cloud hosts in the resource pool is greater than 0, if so, executing step S33; if not, executing step S34; S33: creating the same number of server-side cloud hosts as the difference, and updating the number of server-side cloud hosts in the test parameters; S34: judging whether the difference between the number of client cloud hosts in the test parameters and the number of existing client cloud hosts in the resource pool is greater than 0, if so, executing step S35; if not, executing step S36; S35: creating the same number of client cloud hosts as the difference, and updating the number of client cloud hosts in the test parameters; S36: judging whether the number of client cloud hosts is 0, if not, executing steps S37-S39; if so, executing step S39; S37: Download the public and private keys from the cloud platform's intranet mirror source, and configure the password-free login between the server-side cloud host to be tested and the client cloud host; S38: Configure the security rules for the client cloud host to access the corresponding server-side cloud host to establish an interactive path between the server-side cloud host to be tested and the client cloud host; S39: Assign the updated number of server-side cloud hosts in the test parameters to the number of client cloud hosts in the test parameters; S40: Based on the application installation package and application configuration file downloaded from the cloud platform's intranet mirror source, deploy the application to be tested on the server-side cloud host to be tested; and, based on the stress testing tool installation package and performance testing script downloaded from the cloud platform's intranet mirror source, deploy the stress testing tool on the client cloud host corresponding to the server-side cloud host to be tested; S41: Store the test process in the value (Value) of the dictionary; S42: Determine whether all keys (‌Key) of the client address have corresponding Values. If so, determine that the control module execution failed; if not, determine that the control module execution was successful.

[0167] Figure 14 This is a flow chart of the execution process of the acquisition module, S51: Determine whether there are acquisition script parameters in the test parameters, if so, execute S52, if not, execute S53; S52: Save the script to the server cloud host; S53: Download the acquisition script on the server cloud host; S54: Execute the performance acquisition script on the server cloud host and save the process to the corresponding value in the dictionary; S55: Determine whether all the keys in the dictionary have corresponding values, if so, the acquisition module is executed successfully; if not, the acquisition module fails to execute.

[0168] Figure 15This is a flow chart of the execution process of the observation module, S61: determine whether the addresses of the performance test processes all exist, if so, execute step S62; if not, execute step S63; S62: determine whether the performance test time reaches the preset test time, if so, execute step S63; if not, execute step S64; S63: end the test process of the server-side cloud host to be tested; S64: wait for the preset time, and continue to execute step S61; S65: end the collection process of the client cloud host; S66: confirm whether the performance test process (including the processes of the server-side cloud host to be tested and the client cloud host) does not exist, if not, it is determined that the observation module is executed successfully; if so, it is determined that the observation module fails.

[0169] Figure 16 This is a flow chart of the collection module execution process, which includes: S71: obtaining test data on the client cloud host; S72: obtaining the running data of the application to be tested on the server cloud host to be tested; S73: fitting the collected test data of the client cloud host to obtain a performance test curve chart; S74: fitting the collected running data of the application to be tested to obtain a performance collection curve chart; S75: summarizing the service system information, customer system information, performance test curve chart and performance collection curve chart to obtain a performance test report; S76: judging whether the performance test report is successfully generated. If it is successfully generated, it is determined that the collection module is successfully executed; if it is not successfully generated, it is determined that the collection module has failed to execute.

[0170] Figure 17 This is a flow chart of the execution process of the cleanup module, which includes: S81: cleaning up resources such as users, networks, and security groups; S82: cleaning up cloud host resources; S83: cleaning up performance test files generated by the server cloud host and client cloud host to be tested; S84: exiting the performance test system where the controller is located.

[0171] The cleanup module is responsible for cleaning up the user resources, network resources, cloud host resources and other intermediate information generated by the test system during the test process, and exiting the performance test system.

[0172] Specifically, when the parsing module fails to execute, the user resources, network resources, and cloud host resources generated during the system initialization are cleaned up, and the performance test system is exited. When the control module, acquisition module, and observation module fail to execute, the resources generated during the initialization system and cloud host resources are cleaned up, and the performance test system is exited. When the collection module fails to execute, the resources generated during the initialization system and cloud host resources, as well as the intermediate files generated during the collection, including but not limited to the collection performance files of the server-side cloud host and the stress test data files of the client-side cloud host, are cleaned up, and the performance test system is exited.

[0173] In one embodiment, a performance testing system for a cloud host is provided, the performance testing system comprising:

[0174] In an exemplary embodiment, Figure 18 As shown, a performance testing device for a cloud host is provided, comprising: a deployment module 11, an execution module 12 and a determination module 13, wherein:

[0175] Deployment module 11 is used to deploy the application to be tested on the server-side cloud host to be tested based on the application installation package and application configuration file downloaded from the cloud platform intranet mirror source when the server-side cloud host to be tested exists in the resource pool; and deploy the stress testing tool on the client cloud host corresponding to the server-side cloud host to be tested based on the stress testing tool installation package and performance testing script downloaded from the cloud platform intranet mirror source; the stress testing tool includes the performance testing script; wherein the cloud platform intranet mirror source stores an updated performance testing file, and the updated performance testing file includes at least the application installation package, the application configuration file, and the stress testing tool;

[0176] An execution module 12 is configured to control the operation of the application program under test in the cloud host of the server under test by executing a performance test script in a stress testing tool;

[0177] The determination module 13 is used to determine the performance test result of the server-side cloud host to be tested based on the collected running data of the application to be tested and the test data of the client-side cloud host.

[0178] In an exemplary embodiment, the determination module includes: a fitting unit and a determination unit, wherein:

[0179] A fitting unit, configured to fit the collected test data of the client cloud host to obtain a performance test curve; and to fit the collected running data of the application to be tested to obtain a performance collection curve;

[0180] The determination unit is used to determine the performance test result of the server-side cloud host to be tested based on the performance test curve chart and the performance collection curve chart.

[0181] In an exemplary embodiment, the above-mentioned determination unit is also used to obtain the service system information of the server-side cloud host to be tested and the client system information of the client cloud host; the service system information, client system information, performance test curve chart and performance collection curve chart are summarized to obtain the performance test results of the server-side cloud host to be tested.

[0182] In an exemplary embodiment, the performance testing device for the cloud host further includes: an acquisition module and an end condition determination module, wherein:

[0183] The acquisition module is used to obtain the performance test progress and performance test time of the client cloud host during the execution of the performance test script;

[0184] The end condition determination module is used to determine the end conditions of the collection process of the server cloud host to be tested and the test process of the client cloud host according to the performance test process and performance test time;

[0185] Optionally, the termination conditions for the collection process of the server-side cloud host and the test process of the client cloud host include any of the following:

[0186] When the performance test process is complete and the performance test time reaches the preset test time, the test process of the server cloud host to be tested is terminated; and when the test process is in the end state, the collection process of the client cloud host is terminated;

[0187] If the performance test process is complete and the performance test time has not reached the preset test time, and the performance test time reaches the preset test time after waiting for at least one preset time, the collection process of the server cloud host to be tested and the test process of the client cloud host are terminated at the same time;

[0188] If the performance test process is incomplete, both the collection process of the server cloud host to be tested and the test process of the client cloud host will be terminated.

[0189] In an exemplary embodiment, the performance testing device for the cloud host further includes: a judgment module and a creation module, wherein:

[0190] A judgment module is used to judge whether a cloud host needs to be created in the resource pool based on the test parameters corresponding to the test business;

[0191] The creation module is used to create cloud hosts in the resource pool when it is needed. According to the difference between the number of server cloud hosts in the test parameters and the number of existing server cloud hosts in the resource pool, the creation module creates the same number of server cloud hosts as the difference, and updates the number of server cloud hosts in the test parameters; and according to the difference between the number of client cloud hosts in the test parameters and the number of existing client cloud hosts in the resource pool, the creation module creates the same number of client cloud hosts as the difference, and updates the number of client cloud hosts in the test parameters.

[0192] In an exemplary embodiment, the performance testing device for the cloud host further includes: a type determination module, an assignment module, and a creation module, wherein:

[0193] A type determination module is used to determine the type of test service based on the number of client cloud hosts in the resource pool;

[0194] an assignment module, configured to assign the updated number of server cloud hosts in the test parameters to the number of client cloud hosts in the test parameters when the test service is a first type of service;

[0195] The establishment module is used to establish an interactive path between the client cloud host and the server cloud host to be tested when the test service is the second type of service.

[0196] In an exemplary embodiment, the establishment module includes: a configuration unit and an establishment unit, wherein:

[0197] The configuration unit is used to download the public and private keys from the cloud platform's intranet mirror source and configure the password-free login between the server cloud host under test and the client cloud host;

[0198] The establishment unit is used to configure security rules for the client cloud host to access the corresponding server cloud host, so as to establish an interactive path between the server cloud host to be tested and the client cloud host.

[0199] In an exemplary embodiment, the performance testing device for the cloud host further includes: a verification module and an execution judgment module, wherein:

[0200] The verification module is used to verify the rationality and integrity of the test parameters corresponding to the test business; and to determine whether the remaining resources in the resource pool meet the requirements for creating a cloud host;

[0201] The execution judgment module is used to execute the step of determining whether a cloud host needs to be created in the resource pool of the cloud platform when the test parameter rationality check passes and the remaining resources meet the creation requirements of the cloud host.

[0202] In an exemplary embodiment, the performance testing device for the cloud host further includes a cleaning module, wherein:

[0203] The cleanup module is used to clean up the cloud host resources, network resources and user resources, performance collection files and performance test files generated during the performance test when the performance test is in the end state, and obtain the target resource pool.

[0204] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0205] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A performance testing method for a cloud host, characterized in that: Applied to a controller in any resource pool in a cloud platform, the method includes: In a case where a server-side cloud host to be tested exists in the resource pool, the application to be tested is deployed on the server-side cloud host to be tested based on the application installation package and application configuration file downloaded from the cloud platform intranet mirror source; and, based on the stress testing tool installation package and performance testing script downloaded from the cloud platform intranet mirror source, the stress testing tool is deployed on the client cloud host corresponding to the server-side cloud host to be tested; the stress testing tool includes the performance testing script; wherein the cloud platform intranet mirror source stores an updated performance testing file, and the updated performance testing file includes at least the application installation package, the application configuration file, and the stress testing tool; Controlling the operation of the application program to be tested in the cloud host of the server to be tested by executing the performance test script in the stress testing tool; The performance test result of the server-side cloud host to be tested is determined based on the collected running data of the application to be tested and the test data of the client-side cloud host.

2. The method according to claim 1, characterized in that Determining the performance test result of the server-side cloud host to be tested based on the collected running data of the application to be tested and the test data of the client-side cloud host includes: Fitting the collected test data of the client cloud host to obtain a performance test curve graph; and fitting the collected running data of the application to be tested to obtain a performance collection curve graph; Based on the performance test curve graph and the performance acquisition curve graph, a performance test result of the server-side cloud host to be tested is determined.

3. The method according to claim 2, characterized in that The determining the performance test result of the server-side cloud host to be tested based on the performance test curve graph and the performance collection curve graph includes: Obtaining service system information of the server-side cloud host to be tested and client system information of the client-side cloud host; The service system information, the client system information, the performance test curve chart and the performance collection curve chart are aggregated to obtain the performance test result of the server-side cloud host to be tested.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Obtaining the performance test progress and performance test time of the client cloud host during the execution of the performance test script; According to the performance test process and the performance test time, the end conditions of the collection process of the server cloud host to be tested and the test process of the client cloud host are determined.

5. The method according to claim 4, characterized in that The termination conditions of the collection process of the server-side cloud host to be tested and the test process of the client cloud host include any of the following situations: The performance test process is complete and the performance test time reaches the preset test duration; The performance test process is complete, and the performance test time has not reached the preset test duration, and the performance test time reaches the preset test duration after waiting for at least one preset duration; The performance testing process described is incomplete.

6. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Based on the test parameters corresponding to the test business, determining whether a cloud host needs to be created in the resource pool; If cloud hosts need to be created in the resource pool, creating a number of server cloud hosts equal to the difference between the number of server cloud hosts in the test parameter and the number of existing server cloud hosts in the resource pool, and updating the list of existing server cloud host addresses in the resource pool; Furthermore, according to the difference between the number of client cloud hosts in the test parameter and the number of existing client cloud hosts in the resource pool, a number of client cloud hosts equal to the difference is created, and the address list of existing client cloud hosts in the resource pool is updated.

7. The method according to claim 6, characterized in that The method further comprises: Determining the type of the test service based on the number of client cloud hosts in the resource pool; If the test service is a first type of service, assigning the existing server cloud host address list in the resource pool to the existing client cloud host address list; If the test service is a second type of service, an interaction path is established between the client cloud host and the server cloud host to be tested.

8. The method according to claim 7, characterized in that The step of establishing an interactive path between the client cloud host and the server cloud host to be tested includes: Download the public and private keys from the cloud platform intranet mirror source, and configure the password-free login between the server cloud host to be tested and the client cloud host; Configure security rules for the client cloud host to access the corresponding server cloud host to establish an interactive path between the server cloud host to be tested and the client cloud host.

9. The method according to claim 6, characterized in that The method further comprises: Verifying the test parameters corresponding to the test business; and determining whether the remaining resources in the resource pool meet the requirements for creating a cloud host; If the test parameter verification passes and the remaining amount of resources meets the creation requirement of the cloud host, a step of determining whether a cloud host needs to be created in the resource pool of the cloud platform is performed.

10. The method according to any one of claims 1 to 3, characterized in that The method further comprises: When the performance test is in the final state, clean up the cloud host resources, network resources, user resources, and performance test files generated during the performance test.