Search

CN-122019400-A - Pressure testing system and method based on Ali cloud rapid switching shadow environment

CN122019400ACN 122019400 ACN122019400 ACN 122019400ACN-122019400-A

Abstract

The application discloses a pressure test system and a pressure test method based on an Ali cloud rapid switching shadow environment, and relates to the technical field of Java distributed system pressure test, wherein the system comprises a log acquisition management module, an environment switching module, a pressure test management analysis module and an automatic flow module; the method comprises the steps of directionally writing a pressure measurement log into a temporary path independent of a production environment through a log collection management module, calling an Arian api through an environment switching module to realize one-key switching between the production environment and a shadow environment and triggering application restarting, providing a task management interface through a pressure measurement management analysis module, recording pressure measurement indexes and abnormal logs in real time, calling a large model interface to generate an analysis report, packaging a current limiting switch interface through an automatic flow module to control starting and stopping of a current limiting state, and automatically executing environment switching and restarting flows. The application can reduce the time cost of the pressure test, improve the efficiency of the pressure test and ensure the stability and the usability of the production environment system.

Inventors

  • WANG CHAO

Assignees

  • 金保信社保卡科技有限公司

Dates

Publication Date
20260512
Application Date
20260130

Claims (10)

  1. 1. The pressure test system based on the quick shadow environment switching of the Arin cloud is characterized by comprising a log acquisition management module, an environment switching module, a pressure measurement management analysis module and an automatic flow module; the log acquisition management module is used for directionally writing the pressure measurement log into a temporary path independent of the production environment by modifying a log configuration file of the application framework, and automatically deleting the pressure measurement log after the pressure measurement is completed; The environment switching module is used for calling the Arisaema to realize one-key switching between the production environment and the shadow environment by presetting JVM parameters required by pressure measurement and triggering the restarting of the application; The pressure measurement management analysis module is used for providing a task management interface to submit a pressure measurement task, recording pressure measurement indexes and abnormal logs in real time, calling a large model interface to analyze problems occurring in the pressure measurement process and generating an analysis report; The automatic flow module is used for packaging the current-limiting switch interface, controlling the start and stop of the current-limiting state, and automatically executing the environment switching and restarting flow.
  2. 2. The system for testing the pressure based on the fast alicloud shadow switching environment according to claim 1, wherein the log collection management module specifically comprises: The journal path adjusting unit is used for dynamically adjusting the journal path based on Lombak configuration, so that the pressure measurement journal is written into the temporary catalogue to isolate the production journal acquisition channel; And the log cleaning unit is used for automatically cleaning the log file of the temporary directory after the pressure measurement is finished.
  3. 3. The system for testing the pressure based on the fast alicloud shadow switching environment according to claim 1, wherein the environment switching module specifically comprises: The JVM parameter loading unit is used for loading preset JVM parameters by utilizing spring profiles. And the Ariyamapi unit is used for calling the Ariyamapi based on the JVM parameters, modifying Nacos the database connection parameters of the configuration center to the shadow library in batches, and triggering the application to restart.
  4. 4. The pressure test system based on the fast alicloud switching shadow environment according to claim 1, wherein the pressure test management analysis module specifically comprises: The press measurement task management unit is used for generating a task management interface so as to submit a press measurement task; The index and log recording unit is used for recording the pressure measurement index and the abnormal log in real time; and the problem analysis and report generation unit is used for calling a large model interface to analyze the problems in the pressure measurement process and generate an analysis report according to the pressure measurement index and the abnormal log.
  5. 5. The system for testing pressure based on an alicloud fast switchover shadow environment of claim 4, wherein the pressure testing management analysis module further comprises: The flame diagram generating unit is used for collecting the running state of the CPU of the application server and generating a flame diagram so as to position the application performance problem; and the pressure measurement report integrating unit is used for receiving the pressure measurement result uploaded by the user, calling the Arian interface to acquire the performance index of the current application server, and generating a comprehensive pressure measurement report according to the performance index of the current application server and the pressure measurement result.
  6. 6. The system for testing the pressure based on the fast alicloud switching shadow environment according to claim 1, wherein the automatic flow module specifically comprises: The current limiting switch unit is used for packaging the current limiting switch interface and controlling the start and stop of the current limiting state; and the environment switching restarting unit is used for automatically executing the environment switching and restarting process.
  7. 7. The pressure test method based on the fast switching shadow environment of the ali cloud is characterized in that the pressure test method based on the fast switching shadow environment of the ali cloud is applied to the pressure test system based on the fast switching shadow environment of the ali cloud according to any one of claims 1 to 6, and the pressure test method based on the fast switching shadow environment of the ali cloud comprises the following steps: Inputting the IP addresses of the micro-service to be tested and the default application; after submitting the pressure measurement task, calling an Arin cloud api to switch JVM parameters and restarting the application, and entering a shadow environment; when the pressure measurement task is executed, dynamically controlling the current limiting state through an interface button; after the press measurement task is finished, clicking an end button triggers the system to switch back to the production environment; Uploading the pressure measurement result, automatically associating the performance indexes by the system, and calling the large model to generate a comprehensive pressure measurement report.
  8. 8. The method for testing the pressure based on the fast switching shadow environment of the alicloud according to claim 7, wherein after submitting the pressure testing task, invoking the alicloud api to switch the JVM parameter and restart the application, and entering the shadow environment, specifically comprising: loading a preset JVM parameter by using spring.profiles.active; Calling an Arisaema based on the JVM parameters to modify Nacos database connection parameters of the configuration center in batches to a shadow library; and calling an application restarting interface to perform environment switching and enter a shadow environment.
  9. 9. The method for testing the pressure based on the fast switching shadow environment of the ali cloud according to claim 7, wherein after the press test task is finished and the press test result is uploaded after the system is triggered to switch back to the production environment by clicking the end button, the system automatically associates the performance index and invokes the large model to generate the analysis report, the method for testing the pressure based on the fast switching shadow environment of the ali cloud further comprises: clicking a flame map button to generate a flame map; clicking a flame map view button to view the running state of the CPU of the application server in real time.
  10. 10. The method for testing the pressure based on the fast alicloud shadow switching environment according to claim 7, wherein the step of uploading the pressure testing result, the step of automatically associating the performance indexes by the system and calling the large model to generate the comprehensive pressure testing report comprises the following steps: uploading a pressure measurement result, and calling an Arian interface to acquire the performance index of the current application server; And generating a comprehensive pressure measurement report according to the performance index of the current application server and the pressure measurement result.

Description

Pressure testing system and method based on Ali cloud rapid switching shadow environment Technical Field The application relates to the technical field of Java distributed system pressure testing, in particular to a pressure testing system and method based on an Ali cloud rapid switching shadow environment. Background Since the Java distributed system is to face the impact of large flow, in order to grasp the bearing capacity of the current system and the blocking point that may affect the system performance, it is necessary to perform a full-link pressure test (abbreviated as pressure test) on the production environment (Production Environment) system that the user normally accesses. In general, the full-link pressure measurement has three schemes, the first scheme is to directly simulate normal flow to perform pressure measurement on a system, the first scheme has the defect of influencing the use of a user and generating a large amount of dirty data, the second scheme is to perform pressure measurement on the system in a baffle mode, the second scheme has the defect that the real user request cannot be completely simulated, the third scheme is to perform pressure measurement in a shadow environment (Shadow Environment) based on the shadow link by adopting the shadow link, the pressure measurement environment is ensured to be a production server, and only storage is changed into a shadow library. In the third scheme, since the single-point system cannot bear the request of large flow, the service is split into a plurality of micro services, and each micro service is deployed on a plurality of servers to form a distributed system. When the Java distributed system is subjected to pressure test in a production environment, the following problems exist: (1) The configuration operation is complicated, namely, the configuration parameters such as a database, a redis (open source memory data structure storage system) and the like are required to be manually changed, and the switching is completed through a restarting server, so that the time waste is caused in the restarting process involving a plurality of micro services. (2) The log management is unsmooth, massive logs can be generated in the pressure measurement process, but the traditional log acquisition pipeline can cause congestion, and the log acquisition of the production environment needs to be suspended. (3) The current limiting operation is complicated by the need to shut down the application-related current limiting mechanism during the pressure measurement process, but if the operation sequence is improper, the production environment may be affected or unpredictable results may occur. (4) The existing pressure test process lacks unified management, and the pressure test result cannot be monitored and analyzed in real time, so that the problem investigation is time-consuming and the efficiency is low. In summary, the existence of these problems not only increases the time cost of the pressure test and reduces the efficiency of the pressure test, but also may potentially affect the production environment, ultimately affecting the stability and usability of the production environment system. Disclosure of Invention The application aims to provide a pressure test system and a pressure test method based on an Ali cloud rapid switching shadow environment, which can reduce the time cost of pressure test, improve the efficiency of pressure test and ensure the stability and usability of a production environment system. In order to achieve the above object, the present application provides the following. In a first aspect, the application provides a pressure test system based on an Ali cloud rapid switching shadow environment, which comprises a log acquisition management module, an environment switching module, a pressure measurement management analysis module and an automatic flow module. The log collection management module is used for directionally writing the pressure measurement log into a temporary path independent of the production environment by modifying the log configuration file of the application framework, and automatically deleting the pressure measurement log after the pressure measurement is completed. The environment switching module is used for calling the Ariy api to realize one-key switching between the production environment and the shadow environment by presetting JVM parameters required by pressure measurement and triggering the restarting of the application. The pressure measurement management analysis module is used for providing a task management interface to submit a pressure measurement task, recording pressure measurement indexes and abnormal logs in real time, calling a large model interface to analyze problems occurring in the pressure measurement process and generating an analysis report. The automatic flow module is used for packaging the current-limiting switch interface, controlling the start and stop of the current-limitin