Application system performance test method based on database synchronization delay

By using the KPLSF fusion model for delay dynamic estimation in database performance testing, combined with Kalman filtering and particle filtering, the problem that traditional testing methods are difficult to accurately reflect the delay changes in database master-slave synchronization is solved, and high-precision delay monitoring and system performance evaluation are achieved.

CN119669083APending Publication Date: 2025-03-21NANJING UNARY INFORMATION TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411763273.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

Traditional database performance testing methods are difficult to accurately and in real time to reflect the changes in database master-slave synchronization delay, especially in high concurrency and high load scenarios, resulting in insufficient test results and difficult to meet practical application needs.

Method used

The performance testing method based on the KPLSF fusion model is adopted, combined with Kalman filtering and particle filtering, the synchronization delay amount between the master and slave databases is dynamically estimated, and high-precision tracking of the delay change trend is achieved, and the test parameters and multi-scene test scripts are dynamically adjusted to adapt to the test needs in high concurrency environments.

Benefits of technology

It realizes accurate estimation of database synchronization delay in high concurrency and multi-pressure environments, improves the accuracy and stability of test results, reduces the difficulty of system maintenance and optimization, and provides reliable data support for the performance optimization of database systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669083A_ABST
    Figure CN119669083A_ABST
Patent Text Reader

Abstract

The invention discloses an application system performance testing method based on database synchronization delay. Accurate monitoring and performance analysis of database master-slave synchronization delay in a high-concurrency environment are achieved through dynamic delay estimation and multi-scene testing. Comprising the following steps: deploying a database master-slave synchronization environment on a business system and configuring application software to be tested; installing a performance test tool, dynamically adjusting test parameters, and constructing a synchronous data model of the master and slave databases of the database; monitoring database synchronization delay amount and performance parameters before and after application software deployment in real time through a monitoring system; and compiling a test script, simulating test scenes under normal and abnormal conditions, carrying out dynamic estimation on delay data based on a KPLSF fusion model, analyzing the variation trend of delay amount and performance parameters, and generating a test report. According to the method, high-precision delay monitoring and performance evaluation are provided, and reliable data support and technical guarantee are provided for system tuning, backup strategy optimization and performance improvement of application software.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer system performance testing, and in particular to an application system performance testing method based on database synchronization delay, which is suitable for performance testing of high concurrency and high load scenarios in a database master-slave synchronization environment. Background Art

[0002] As the scale and complexity of database application systems continue to increase, how to ensure efficient operation and data consistency of the database has become a key issue in system design and maintenance. In a typical distributed database architecture, the master-slave synchronization mechanism of the database is widely adopted. By regularly synchronizing the data of the master database to the slave database, the high availability of the system and the security of data backup are ensured. However, the synchronization delay between the master and slave databases will directly affect the real-time performance and data consistency of the system, and have an important impact on the stability of the system and user experience. Therefore, accurately evaluating the impact of application software on the master-slave synchronization delay is crucial for optimizing and troubleshooting database systems.

[0003] Traditional database performance testing methods usually focus on the database's response speed, transaction processing capabilities, and load capacity under high concurrency conditions, but rarely monitor and analyze the database master-slave synchronization delay in real time. Especially in high-concurrency and high-load business scenarios, the dynamic changes in database synchronization delay are more complex, and traditional methods are difficult to accurately and in real time reflect the performance status of the system. When dealing with complex system delay changes, existing performance testing tools lack the ability to dynamically estimate delay data and identify abnormal situations, resulting in inaccurate test results that are difficult to meet actual application needs. Summary of the invention

[0004] In response to the above problems, the present invention proposes an application system performance testing method based on database synchronization delay, designs a test process that can dynamically adjust parameters and adapt to a variety of high-concurrency test scenarios, and especially combines the KPLSF fusion model of Kalman filter and particle filter to dynamically estimate the delay amount. This method achieves high-precision tracking of delay change trends through the collection and denoising of real-time delay data, and verifies the actual impact of application software on system performance in a variety of test scenarios.

[0005] In order to achieve the above object, the present invention is implemented by the following technical solutions:

[0006] A method for testing application system performance based on database synchronization delay comprises the following steps:

[0007] S1: Deploy databases on two business systems and configure master-slave synchronization, and deploy the application software to be tested on the business system of the master database;

[0008] S2: Install the performance testing tool on the business system of the database master database, and build the synchronization data model of the database master and slave database by configuring dynamically adjusted test parameters;

[0009] S3: monitoring the synchronization delay and performance parameters between the master and slave databases of the application software to be tested before and after deployment through a monitoring system;

[0010] S4: Write test scripts to simulate high-concurrency, multi-stress test scenarios under normal and abnormal conditions, including system performance under failure conditions and export reports for analysis;

[0011] S5: Based on the changing trend data of delay and performance parameters, the KPLSF fusion model is used to dynamically estimate the delay, and the impact of the application software on the performance of the business system is evaluated based on the estimation results. The data is organized into a test report.

[0012] Preferably, in step S2, the test parameters dynamically adjusted by configuration specifically include:

[0013] Histogram generation for statistical delay distribution;

[0014] The response time percentile is set to 95 to accommodate high concurrency scenarios;

[0015] The number of working threads is dynamically adjusted according to the actual load to simulate the system performance under different pressure conditions;

[0016] The number of requests is set to unlimited, the execution time is set to unlimited, the report output frequency is set to 5 seconds, and real-time data is captured.

[0017] Preferably, in step S2, constructing the synchronization data model of the master-slave database includes the following steps:

[0018] Create 10 test tables, each containing 10 million records;

[0019] Continue to stress test the master database and ensure that the master-slave database delay is 0.

[0020] Preferably, in step S3, the synchronization delay test process includes:

[0021] Compare the synchronization delay between the master and slave databases before and after the deployment of the application software under test;

[0022] Record and compare the delay of the database master and slave libraries and the changes in CPU and memory performance parameters during the use of the application software under test, and denoise the collected data.

[0023] Preferably, in step S3, the performance parameters include:

[0024] CPU calculation time, used for prime number calculation test;

[0025] Memory continuous read and write test, used to limit memory usage to less than 80%;

[0026] Network transmission speed, used to limit the total transmission flow of a Gigabit network card to less than 100 mb / s;

[0027] The load indicators of transaction processing number and read and write times evaluate the system's responsiveness under high concurrency conditions.

[0028] Preferably, in step S4, the test scenario includes:

[0029] High concurrency, multiple stresses and long-term use under normal conditions;

[0030] High concurrency, multiple stresses, and long-term use under abnormal conditions, simulating failure conditions including sudden increase in network latency, high CPU and memory usage.

[0031] Preferably, in step S4, the test scenario further includes:

[0032] The preparation phase is used to initialize the test data and environment;

[0033] The execution phase is used to actually execute the test and monitor the latency and performance parameters in real time;

[0034] The cleanup phase is used to clear data and restore the system environment after the test.

[0035] Preferably, in step S5, the delay amount is calculated as follows:

[0036] Collect network delay and load delay related data, perform denoising and normalization, and divide them into training sets and test sets;

[0037] Initialize the parameters of the KPLSF fusion model, including:

[0038] Kalman filter state transition moment A, control matrix B, observation matrix H, process noise w k and measurement noise v k ; The nonlinear state transfer function f(·) of the particle filter, the number of particles N, and the process noise of each particle

[0039] Weight matrix W f , W i , W C , W o and the bias vector b f 、b i 、b C 、b o ;

[0040] According to the Kalman filter state update equation, the delay estimate at time k is calculated:

[0041]

[0042] in, is the delay estimate; is the delay estimate of the previous moment, u k is the control input;

[0043] According to the Kalman filter observation update equation, combined with the observation value z k , correct the delay estimate:

[0044]

[0045] Perform state prediction for each particle i and obtain the predicted delay estimate:

[0046]

[0047] in, is the state of the ith particle at time k; is the state of the i-th particle at time k-1;

[0048] According to the observed value z k And the particle prediction results, update the particle weights:

[0049]

[0050] in, represents the state of particle i Next, the observed value z k The likelihood probability of ; Represents the sum of the observation likelihoods of all particles, which is used to normalize the weight of each particle to ensure that the sum of the weights is 1;

[0051] Calculate the weighted average estimate of the particle filter

[0052]

[0053] Perform time-dependent prediction and calculate the hidden state h at the current time k t :

[0054] h t =o t ×tanh(C t )

[0055] Weighted fusion to obtain the final delay estimate

[0056]

[0057] Among them, α and β are weighted fusion coefficients used to adjust the proportion and weight.

[0058] Preferably, in step S5, the KPLSF fusion model further includes:

[0059] Considering the nonlinear volatility of database master-slave synchronization delay in a high-concurrency environment, the present invention adopts the KPLSF fusion model, which combines the advantages of Kalman filtering and particle filtering and is suitable for processing linearly and nonlinearly changing delay data.

[0060] The Kalman filter is used to process the delay estimation of the linear part and is suitable for scenarios where the network delay and system load are relatively stable;

[0061] The particle filter is used to capture nonlinear delay changes and is suitable for nonlinear delay fluctuation scenarios under high concurrency and long-term stress testing;

[0062] The weighting coefficients α and β are dynamically adjusted during the fusion process according to the current real-time load, network bandwidth and delay distribution characteristics of the database master and slave.

[0063] Preferably, in step S5, the test report includes:

[0064] The change curve of database master-slave synchronization delay;

[0065] The fluctuation range of memory and CPU usage;

[0066] The frequency and magnitude of changes in system load and identifying anomalies in monitoring data.

[0067] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention dynamically estimates the synchronization delay between the master and slave databases of the database through the KPLSF model, combines the linear change of the Kalman filter processing delay and the particle filter to capture the nonlinear delay fluctuation, realizes the accurate estimation of the delay in a high concurrency and multi-stress environment, and provides reliable data support for system performance analysis. In addition, by configuring the dynamically adjusted test parameters (such as the percentage of response time, the number of working threads and the number of requests, etc.) in the performance testing tool, the present invention can be adaptively adjusted according to the test requirements to ensure the accuracy of the test data in a high concurrency environment, improve the test flexibility and reduce manual intervention. The multi-scenario test scripts written in the test method cover high concurrency and multi-stress scenarios under normal and abnormal conditions, including the system performance under fault conditions, so that the test coverage is wide, and the performance of the system under extreme conditions is comprehensively evaluated, which helps to find potential performance bottlenecks. At the same time, by real-time monitoring of the changes in the delay and performance parameters in the monitoring system, the present invention can accurately record the changes in the master-slave synchronization delay of the database before and after the application deployment, and the data after denoising and normalization provides a reliable basis for performance trend analysis. After the test is completed, the system organizes the change trend data of the delay amount and performance parameters to generate a test report. The report content not only provides intuitive data support for the software development and operation and maintenance team, helps to identify performance bottlenecks and propose optimization measures, but can also be used for subsequent performance optimization and system improvement, and improve the stability and efficiency of the system in high-concurrency scenarios. Therefore, the present invention provides an effective means for database master-slave synchronization delay monitoring and performance evaluation through dynamic delay estimation, flexible parameter configuration, multi-scenario coverage and real-time monitoring, greatly improves the accuracy and stability of the test results, significantly reduces the difficulty of system maintenance and tuning, and provides a solid guarantee for the efficient and stable operation of the business system. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0069] in:

[0070] Figure 1 is a flow chart of a method according to an embodiment of the present invention;

[0071] Figure 2 A relationship diagram of a test environment in an embodiment of the present invention;

[0072] Figure 3 This is a test flow chart in an embodiment of the present invention;

[0073] Figure 4 This is a schematic diagram of a conventional function test report in an embodiment of the present invention;

[0074] Figure 5 This is a schematic diagram of a multi-concurrency scenario function test report in an embodiment of the present invention;

[0075] Figure 6 It is a schematic diagram of a long-term stability scenario test report in an embodiment of the present invention. DETAILED DESCRIPTION

[0076] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.

[0077] Example 1

[0078] like Figure 1-Figure 3 FIG. 1 is an embodiment of the present invention, which provides an application system performance testing method based on database synchronization delay, including:

[0079] S1: Deploy databases on two business systems and configure master-slave synchronization, and deploy the application software to be tested on the business system of the master database;

[0080] S2: Install the performance testing tool on the business system of the database master database, and build the synchronization data model of the database master and slave database by configuring dynamically adjusted test parameters;

[0081] Specifically, in step S2, the test parameters dynamically adjusted by configuration specifically include:

[0082] Histogram generation for statistical delay distribution;

[0083] The response time percentile is set to 95 to accommodate high concurrency scenarios;

[0084] The number of working threads is dynamically adjusted according to the actual load to simulate the system performance under different pressure conditions;

[0085] The number of requests is set to unlimited, the execution time is set to unlimited, the report output frequency is set to 5 seconds, and real-time data is captured.

[0086] Wherein, in step S2, the construction of the synchronization data model of the master-slave database includes the following steps:

[0087] Create 10 test tables, each containing 10 million records;

[0088] Continue to stress test the master database and ensure that the master-slave database delay is 0.

[0089] Further, S3: monitoring the synchronization delay and performance parameters between the master and slave databases of the application software to be tested before and after deployment through a monitoring system;

[0090] Specifically, in step S3, the synchronization delay test process includes:

[0091] Compare the synchronization delay between the master and slave databases before and after the deployment of the application software under test;

[0092] Record and compare the delay of the database master and slave libraries and the changes in CPU and memory performance parameters during the use of the application software under test, and denoise the collected data.

[0093] Wherein, in step S3, the performance parameters include:

[0094] CPU calculation time, used for prime number calculation test;

[0095] Memory continuous read and write test, used to limit memory usage to less than 80%;

[0096] Network transmission speed, used to limit the total transmission flow of a Gigabit network card to less than 100 mb / s;

[0097] The load indicators of transaction processing number and read and write times evaluate the system's responsiveness under high concurrency conditions.

[0098] Further, S4: write test scripts to simulate high-concurrency, multi-stress test scenarios under normal and abnormal conditions, including system performance under failure conditions and export reports for analysis;

[0099] The test script scenario settings include the following types of exceptions:

[0100] Sudden increase in network latency: For example, increase the network latency from 0.5ms to 50ms to simulate network fluctuations under high load;

[0101] High CPU usage: Set the system's CPU utilization to 90% to simulate resource consumption in a high-concurrency environment;

[0102] High memory usage: Control the memory usage to 80% to simulate the memory consumption of multiple tasks running simultaneously.

[0103] Specifically, in step S4, the test scenario includes:

[0104] High concurrency, multiple stresses and long-term use under normal conditions;

[0105] High concurrency, multiple stresses, and long-term use under abnormal conditions, simulating failure conditions including sudden increase in network latency, high CPU and memory usage.

[0106] Wherein, in step S4, the test scenario further includes:

[0107] The preparation phase is used to initialize the test data and environment;

[0108] The execution phase is used to actually execute the test and monitor the latency and performance parameters in real time;

[0109] The cleanup phase is used to clear data and restore the system environment after the test.

[0110] Further, S5: through the change trend data of the delay amount and the performance parameters, the delay amount is dynamically estimated through the KPLSF fusion model, and the impact of the application software on the business system performance is evaluated based on the estimation results, and the data is organized into a test report.

[0111] Specifically, in step S5, the delay amount is calculated as follows:

[0112] Collect network delay and load delay related data, perform denoising and normalization, and divide them into training sets and test sets;

[0113] Initialize the parameters of the KPLSF fusion model, including:

[0114] Kalman filter state transition moment A, control matrix B, observation matrix H, process noise w k and measurement noise v k ; The nonlinear state transfer function f(·) of the particle filter, the number of particles N, and the process noise of each particle

[0115] Weight matrix W f , W i , W C , W o and the bias vector b f 、b i 、b C 、b o ;

[0116] According to the Kalman filter state update equation, the delay estimate at time k is calculated:

[0117]

[0118] in, is the delay estimate; is the delay estimate of the previous moment, u k is the control input;

[0119] According to the Kalman filter observation update equation, combined with the observation value z k , correct the delay estimate:

[0120]

[0121] Perform state prediction for each particle i and obtain the predicted delay estimate:

[0122]

[0123] in, is the state of the ith particle at time k; is the state of the i-th particle at time k-1;

[0124] According to the observed value z k And the particle prediction results, update the particle weights:

[0125]

[0126] in, represents the state of particle i Next, the observed value z k The likelihood probability of ; Represents the sum of the observation likelihoods of all particles, which is used to normalize the weight of each particle to ensure that the sum of the weights is 1;

[0127] Calculate the weighted average estimate of the particle filter

[0128]

[0129] Perform time-dependent prediction and calculate the hidden state h at the current time k t :

[0130] h t =o t ×tanh(C t )

[0131] Weighted fusion to obtain the final delay estimate

[0132]

[0133] Among them, α and β are weighted fusion coefficients used to adjust the proportion and weight.

[0134] Specifically, the KPLSF fusion model further includes:

[0135] The Kalman filter is used to process the delay estimation of the linear part and is suitable for scenarios where the network delay and system load are relatively stable;

[0136] The particle filter is used to capture nonlinear delay changes and is suitable for nonlinear delay fluctuation scenarios under high concurrency and long-term stress testing;

[0137] The weighting coefficients α and β are dynamically adjusted during the fusion process according to the current real-time load, network bandwidth and delay distribution characteristics of the database master and slave.

[0138] Specifically, in step S5, the test report includes:

[0139] The change curve of database master-slave synchronization delay;

[0140] The fluctuation range of memory and CPU usage;

[0141] The frequency and magnitude of changes in system load and identifying anomalies in monitoring data.

[0142] Example 2

[0143] In this embodiment, first, a MySQL master-slave synchronization environment is deployed on the business system, and a performance testing tool (such as sysbench) is used to create 210 test tables in the MySQL master database, each containing 10 million data, to lay the foundation for subsequent stress testing. After the test data is created, a performance testing tool is used to continuously apply load pressure to the database, and at the same time, a monitoring system (such as Prometheus) is used to monitor the delay between the MySQL master and slave databases to ensure that the master and slave database delay remains at 0, thereby ensuring the consistency of the initial state of the test.

[0144] Next, use the monitoring system to monitor the CPU usage, memory usage, and IO load of the business system within half an hour, and record the relevant data to obtain the performance benchmark data of the system without the intervention of the application to be tested.

[0145] After completing the benchmark data collection, deploy the application software to be tested to the business system, and use the monitoring system again to monitor the MySQL master-slave synchronization delay, CPU usage, memory usage, and IO load of the business system within half an hour after the software is deployed. Compare the data recording results of this stage with the previous benchmark data to evaluate the impact of application software deployment on system resources and master-slave synchronization delay. Subsequently, run the application software to be tested, and use the monitoring system to monitor the MySQL master-slave synchronization delay, CPU usage, memory usage, and IO load of the business system within half an hour during the operation process. Compare the recorded results with the initial benchmark data to analyze the impact of the application software on system resources and synchronization delay under normal operation. Next, simulate a multi-concurrency scenario and run the application software to be tested. In a multi-concurrency environment, use the monitoring system again to monitor the MySQL master-slave synchronization delay, CPU usage, memory usage, and IO load of the business system within half an hour, and compare the data recording results with the benchmark data. According to the test requirements, adjust the concurrency number of the application software to be tested, repeat the test under the concurrency scenario, and record multiple groups of test results to analyze the impact of the concurrency number on system resources and synchronization delay.

[0146] In each test, the collected delay data is de-noised and normalized before being fed into the KPLSF model for real-time delay estimation. The model consists of two main parts: a Kalman filter for processing linearly varying delays and a particle filter for capturing nonlinear delay fluctuations.

[0147] Finally, to evaluate the stability of the system in long-term operation, the application software to be tested was run continuously for one week, and during this period, the monitoring system was used to regularly monitor the MySQL master-slave synchronization delay, CPU usage, memory usage, and IO load of the business system every half hour, especially recording abnormal data of the system in long-term operation. These data will be processed by the KPLSF model to provide accurate delay estimation and intelligently identify abnormal fluctuations, which will be used to analyze the performance and resource usage of the application software in long-term operation.

[0148] Example 3

[0149] like Figures 4 to 6 As shown, another embodiment of the present invention deploys the client of the backup software to the business system, configures a continuous data backup strategy for the business system on the server of the backup software, and monitors the synchronization delay of the MySQL master-slave library on the business system during the operation of the backup task to determine the impact of the backup task on the system performance.

[0150] Test environment:

[0151] Operating system: CentOS 7.6

[0152] Database: MySQL 8.0

[0153] Test tool: sysbench

[0154] Monitoring tool: Prometheus

[0155] Test method:

[0156] Environment initialization

[0157] Use containers to quickly deploy two CentOS 7.6 operating systems, install MySQL 8.0 databases on each system, and configure master-slave synchronization. Use the sysbench tool to continuously insert data into the master database, and ensure that the master-slave synchronization delay is 0 by adjusting the number of threads and databases. Use Prometheus to monitor the CPU usage, memory usage, and IO load of the system where the slave database is located, and record these benchmark data.

[0158] like Figure 4 The figure below shows a routine functional test. When no backup software is deployed on the business system, the CPU, memory, and IO usage are recorded and monitored in different backup states (initialization, protection, and incremental initialization). The results show that in different backup states, the CPU, memory, and IO loads remain basically stable, with almost no significant impact on business system performance.

[0159] like Figure 5 As shown in the figure, in the multi-concurrency scenario test, the backup software client is deployed on the business system corresponding to the slave library, the backup strategy is configured and the number of backup threads is adjusted to 8 to simulate the backup operation in a high-concurrency scenario. The changes in synchronization delay, CPU usage, memory usage, and IO load are recorded in different backup states (no backup deployed, initialization, protection, incremental initialization). The results show that in a multi-concurrency environment, the initialization and incremental initialization backup of the backup software will increase CPU and memory usage, but the synchronization delay remains at a low level.

[0160] like Figure 6 As shown in the figure, the long-term stability test keeps the backup software in the "protection" state and runs it for a week to test the stability of the system in long-term operation. During this period, Prometheus regularly monitors the synchronization delay, CPU usage, memory usage, and IO load of the MySQL master and slave libraries. The test results show that in long-term operation, the system resource usage is basically stable, the master-slave synchronization delay remains within a reasonable range, and the backup task has no significant impact on the performance of the business system.

[0161] Test conclusion:

[0162] In routine functional testing, the operation of the backup software has no obvious impact on the performance of the business system.

[0163] In a multi-concurrency scenario, the CPU and memory usage of the backup software under high-concurrency backup threads increases slightly, but the master-slave synchronization delay remains stable.

[0164] In long-term stability testing, the backup software has little impact on business system performance, system resource usage is stable, and it has long-term operational reliability.

[0165] This embodiment verifies the performance of the backup software and its impact on the business system through tests under different backup states and load conditions. The test report data provides a basis for subsequent optimization of the concurrent configuration and resource management of the backup software, ensuring the high efficiency of the backup task and low interference with the system.

[0166] In summary, the present invention realizes accurate monitoring of database master-slave synchronization delay and comprehensive evaluation of application system performance through innovative dynamic delay estimation algorithm, flexible test parameter adjustment, multi-scenario test coverage, data denoising and long-term monitoring. This method not only improves the accuracy and reliability of test results, but also significantly reduces the difficulty of system maintenance and optimization, providing strong technical support for performance optimization of database and backup systems.

[0167] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.

[0168] Any process or method description in the flow chart or otherwise described herein can be understood to represent a module, fragment or portion of a code including one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.

[0169] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for testing application system performance based on database synchronization delay, characterized in that: The following steps are involved: S1: Deploy databases on two business systems and configure master-slave synchronization, and deploy the application software to be tested on the business system of the master database; S2: Install the performance testing tool on the business system of the database master database, and build the synchronization data model of the database master and slave database by configuring dynamically adjusted test parameters; S3: monitoring the synchronization delay and performance parameters between the master and slave databases of the application software to be tested before and after deployment through a monitoring system; S4: Write test scripts to simulate high-concurrency, multi-stress test scenarios under normal and abnormal conditions, including system performance under failure conditions and export reports for analysis; S5: Based on the changing trend data of delay and performance parameters, the KPLSF fusion model is used to dynamically estimate the delay, and the impact of the application software on the performance of the business system is evaluated based on the estimation results. The data is organized into a test report.

2. The application system performance testing method based on database synchronization delay according to claim 1 is characterized in that: In step S2, the test parameters dynamically adjusted by configuration specifically include: Histogram generation for statistical delay distribution; The response time percentile is set to 95 to accommodate high concurrency scenarios; The number of working threads is dynamically adjusted according to the actual load to simulate the system performance under different pressure conditions; The number of requests is set to unlimited, the execution time is set to unlimited, the report output frequency is set to 5 seconds, and real-time data is captured.

3. The application system performance testing method based on database synchronization delay according to claim 1 is characterized in that: In step S2, the construction of the synchronization data model of the master-slave database includes the following steps: Create 10 test tables, each containing 10 million records; Continue to stress test the master database and ensure that the master-slave database delay is 0.

4. The application system performance testing method based on database synchronization delay according to claim 1 is characterized in that: In step S3, the synchronization delay test process includes: Compare the synchronization delay between the master and slave databases before and after the deployment of the application software under test; Record and compare the delay of the database master and slave libraries and the changes in CPU and memory performance parameters during the use of the application software under test, and denoise the collected data.

5. The application system performance testing method based on database synchronization delay according to claim 1 is characterized in that: In step S3, the performance parameters include: CPU calculation time, used for prime number calculation test; Memory continuous read and write test, used to limit memory usage to less than 80%; Network transmission speed, used to limit the total transmission flow of a Gigabit network card to less than 100 mb / s; The load indicators of transaction processing number and read and write times evaluate the system's responsiveness under high concurrency conditions.

6. The application system performance testing method based on database synchronization delay according to claim 1 is characterized in that: In step S4, the test scenario includes: High concurrency, multiple stresses and long-term use under normal conditions; High concurrency, multiple stresses, and long-term use under abnormal conditions, simulating failure conditions including sudden increase in network latency, high CPU and memory usage.

7. The application system performance testing method based on database synchronization delay according to claim 1 is characterized in that: In step S4, the test scenario further includes: The preparation phase is used to initialize the test data and environment; The execution phase is used to actually execute the test and monitor the latency and performance parameters in real time; The cleanup phase is used to clear data and restore the system environment after the test.

8. The application system performance testing method based on database synchronization delay according to claim 1 is characterized in that: In step S5, the delay amount is calculated as follows: Collect network delay and load delay related data, perform denoising and normalization, and divide them into training sets and test sets; Initialize the parameters of the KPLSF fusion model, including: Kalman filter state transition moment A, control matrix B, observation matrix H, process noise w k and measurement noise v k ; The nonlinear state transfer function f(·) of the particle filter, the number of particles N, and the process noise of each particle Weight matrix W f , W i , W C , W o and the bias vector b f , b i , b C , b o ; According to the Kalman filter state update equation, the delay estimate at time k is calculated: in, is the delay estimate; is the delay estimate of the previous moment, u k is the control input; According to the Kalman filter observation update equation, combined with the observation value z k , correct the delay estimate: Perform state prediction for each particle i and obtain the predicted delay estimate: in, is the state of the ith particle at time k; is the state of the i-th particle at time k-1; According to the observed value z k And the particle prediction results, update the particle weights: in, represents the state of particle i Next, the observed value z k The likelihood probability of ; Represents the sum of the observation likelihoods of all particles, which is used to normalize the weight of each particle to ensure that the sum of the weights is 1; Calculate the weighted average estimate of the particle filter Perform time-dependent prediction and calculate the hidden state h at the current time k t : h t =o t ×tanh(C t ) Weighted fusion to obtain the final delay estimate Among them, α and β are weighted fusion coefficients used to adjust the proportion and weight.

9. The application system performance testing method based on database synchronization delay according to claim 8 is characterized in that: In step S5, the KPLSF fusion model further includes: The Kalman filter is used to process the delay estimation of the linear part and is suitable for scenarios where the network delay and system load are relatively stable. The particle filter is used to capture nonlinear delay changes and is suitable for scenarios where nonlinear delay fluctuations occur under high concurrency and long-term stress testing. The weighting coefficients α and β are dynamically adjusted during the fusion process according to the current real-time load, network bandwidth and delay distribution characteristics of the database master and slave.

10. The application system performance testing method based on database synchronization delay according to claim 1 is characterized in that: In step S5, the test report includes: The change curve of database master-slave synchronization delay; The fluctuation range of memory and CPU usage; The frequency and magnitude of changes in system load and identifying anomalies in monitoring data.

Citation Information

Cited By

  • Notebook computer multi-scene pressure test method and system applied to factory detection

    CN120429182A

  • Laptop multi-scenario stress testing method and system for factory inspection

    CN120429182B