CN110865913B - Pressure testing method and device - Google Patents

Pressure testing method and device Download PDF

Info

Publication number
CN110865913B
CN110865913B CN201911069384.1A CN201911069384A CN110865913B CN 110865913 B CN110865913 B CN 110865913B CN 201911069384 A CN201911069384 A CN 201911069384A CN 110865913 B CN110865913 B CN 110865913B
Authority
CN
China
Prior art keywords
test
period
preset
service flow
periods
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911069384.1A
Other languages
Chinese (zh)
Other versions
CN110865913A (en
Inventor
安继贤
李晶
晋晓峰
盛勤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN201911069384.1A priority Critical patent/CN110865913B/en
Publication of CN110865913A publication Critical patent/CN110865913A/en
Application granted granted Critical
Publication of CN110865913B publication Critical patent/CN110865913B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a pressure testing method and a device, wherein the method comprises the following steps: the method comprises the steps of collecting first service flow actually generated by a device to be tested in a plurality of preset time periods, determining second service flow used for testing in each test time period according to the first service flow in the plurality of preset time periods, starting a thread used for sending test tasks to the device to be tested according to the second service flow in each test time period, and performing pressure test on the device to be tested. According to the technical scheme, the service flow carried by the device to be tested in the real scene can be simulated, so that the performance of the device to be tested in the real scene can be accurately estimated.

Description

Pressure testing method and device
Technical Field
The embodiment of the invention relates to the field of financial science and technology (Fintech), in particular to a pressure testing method and device.
Background
With the development of computer technology, more and more technologies are applied in the financial field, the traditional financial industry is gradually changed to the financial technology, and the pressure test technology (performance test technology) is not exceptional, but the pressure test technology is also required to be higher due to the requirements of safety and instantaneity of the financial and payment industries.
In the existing pressure test, a fixed pressure test mode is mainly adopted, for example, the pressure test is carried out on the device to be tested according to the concurrency number of 100 users or 500TPS (Transaction Per Second, transaction number per second). However, the test result obtained by the test mode often cannot be accurately evaluated on the device to be tested.
Disclosure of Invention
The embodiment of the invention provides a pressure test method and device, which are used for solving the problem that the conventional pressure test cannot simulate the service flow of a real scene, so that accurate evaluation cannot be performed on a device to be tested.
The method for testing the pressure provided by the embodiment of the invention comprises the following steps:
Collecting first service flow which actually occurs in a device to be tested in a plurality of preset time periods;
Determining second service flow for testing in each testing period according to the first service flow in the plurality of preset periods;
and starting a thread for sending a test task to the device to be tested according to the second service flow of each test period, and performing pressure test on the device to be tested.
Optionally, the determining the second traffic for testing in each testing period according to the first traffic in the plurality of preset periods includes:
The following operations are performed for any adjacent two preset periods of the plurality of preset periods:
If the two preset time periods are continuous, determining the first service flow of each preset time period as the second service flow of the corresponding test time period of each preset time period;
If the two preset time periods are discontinuous, determining a plurality of test time periods according to the two preset time periods, and determining second service flow of each test time period according to first service flow of the two preset time periods.
Optionally, the determining the second traffic of each test period according to the first traffic of the two preset periods includes:
determining a trend rule of the historical service flow in the period between the two preset periods in the historical data;
and determining the second service flow of each test period according to the trend rule and the first service flow of the two preset periods.
Optionally, the trend rule is a linear change;
the second service flow of each test period is determined to be in accordance with the formula (1);
The formula (1) is:
Wherein B 1 is the first traffic flow of the previous preset period of the two preset periods, B 2 is the first traffic flow of the next preset period of the two preset periods, A 1 is the previous preset period of the two preset periods, A 2 is the next preset period of the two preset periods, A 1 +K is the Kth test period of the periods between the two preset periods, And the second service flow of the test period A 1 +K.
Optionally, the second traffic flow is a user concurrency number;
starting a thread for sending a test task to the device to be tested according to the second service flow of each test period, and performing a pressure test on the device to be tested, including:
Starting N threads; n is determined by the maximum user concurrency number in the user concurrency numbers of each test period;
For any test period, according to the user concurrency number of the test period, invoking M threads corresponding to the user concurrency number of the test period, so that each thread in the M threads continuously transmits a test task to the device to be tested in the test period; n is a positive integer, M is a positive integer, and M is less than or equal to N.
Optionally, the second service flow is a transaction number TPS per second;
starting a thread for sending a test task to the device to be tested according to the second service flow of each test period, and performing a pressure test on the device to be tested, including:
starting N threads; n is determined by the largest TPS in TPS of each test period;
For any test period, according to the TPS of the test period, M threads corresponding to the TPS of the test period are called, so that each thread in the M threads sends a preset number of test tasks to the device to be tested in the test period; n is a positive integer, M is a positive integer, and M is less than or equal to N.
According to the technical scheme, the service flow of the device to be tested for testing in each testing period is determined by collecting the service flow of the device to be tested actually occurring in a plurality of preset periods, and the determined service flow of each testing period is used for carrying out pressure testing on the device to be tested, so that the service flow carried by the device to be tested in a real scene can be simulated, and the performance of the device to be tested in the real scene can be accurately estimated.
Correspondingly, the embodiment of the invention also provides a device for testing the pressure, which comprises:
the device comprises an acquisition unit and a processing unit;
the acquisition unit is used for acquiring first service flow which actually occurs in a plurality of preset time periods of the device to be tested;
The processing unit is used for determining second service flow for testing in each testing period according to the first service flow in the plurality of preset periods; and starting a thread for sending a test task to the device to be tested according to the second service flow of each test period, and performing pressure test on the device to be tested.
Optionally, the processing unit is specifically configured to:
The following operations are performed for any adjacent two preset periods of the plurality of preset periods:
If the two preset time periods are continuous, determining the first service flow of each preset time period as the second service flow of the corresponding test time period of each preset time period;
If the two preset time periods are discontinuous, determining a plurality of test time periods according to the two preset time periods, and determining second service flow of each test time period according to first service flow of the two preset time periods.
Optionally, the processing unit is specifically configured to:
determining a trend rule of the historical service flow in the period between the two preset periods in the historical data;
and determining the second service flow of each test period according to the trend rule and the first service flow of the two preset periods.
Optionally, the trend rule is a linear change;
the processing unit is specifically configured to:
Determining a second traffic flow for each test period according to formula (1);
The formula (1) is:
Wherein B 1 is the first traffic flow of the previous preset period of the two preset periods, B 2 is the first traffic flow of the next preset period of the two preset periods, A 1 is the previous preset period of the two preset periods, A 2 is the next preset period of the two preset periods, A 1 +K is the Kth test period of the periods between the two preset periods, And the second service flow of the test period A 1 +K.
Optionally, the second traffic flow is a user concurrency number;
the processing unit is specifically configured to:
Starting N threads; n is determined by the maximum user concurrency number in the user concurrency numbers of each test period;
For any test period, according to the user concurrency number of the test period, invoking M threads corresponding to the user concurrency number of the test period, so that each thread in the M threads continuously transmits a test task to the device to be tested in the test period; n is a positive integer, M is a positive integer, and M is less than or equal to N.
Optionally, the second service flow is a transaction number TPS per second;
the processing unit is specifically configured to:
starting N threads; n is determined by the largest TPS in TPS of each test period;
For any test period, according to the TPS of the test period, M threads corresponding to the TPS of the test period are called, so that each thread in the M threads sends a preset number of test tasks to the device to be tested in the test period; n is a positive integer, M is a positive integer, and M is less than or equal to N.
Accordingly, an embodiment of the present invention further provides a computing device, including:
a memory for storing program instructions;
And the processor is used for calling the program instructions stored in the memory and executing the pressure test method according to the obtained program.
Accordingly, an embodiment of the present invention further provides a computer-readable nonvolatile storage medium, including computer-readable instructions, which when read and executed by a computer, cause the computer to perform the method for pressure testing described above.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for pressure testing according to an embodiment of the present invention;
Fig. 3 is a schematic structural diagram of a pressure testing device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 illustrates a system architecture to which a pressure testing method provided by an embodiment of the present invention is applicable, where the system architecture may include a testing device 101 and a device to be tested 102, and when the device to be tested 102 performs service change or software and hardware improvement, the testing device 101 is required to perform pressure testing on the device to be tested 102. Specifically, the testing device 101 sends a testing task to the device to be tested 102, the device to be tested 102 receives the testing task and processes the testing task, and the testing device 101 generates a performance result of the device to be tested 102 according to parameters such as response time of the device to be tested 102 to process the testing task, maximum user concurrency number, maximum TPS and the like. Where the number of user concurrency refers to the number of user requests/transactions processed by the system at the same time, and TPS refers to the number of transaction requests processed by the system per second.
Based on the above description, fig. 2 illustrates an exemplary flow of a method for pressure testing according to an embodiment of the present invention, where the flow may be performed by a device for pressure testing, and the device may be located in or may be the testing device.
As shown in fig. 2, the process specifically includes:
step 201, collecting first service flows actually generated by a device to be tested in a plurality of preset time periods;
The method comprises the steps that a plurality of preset time periods of a device to be tested can be determined according to specific service conditions of the device to be tested, and then first service flow actually occurring by the device to be tested is collected in each preset time period, wherein the preset time period is understood to be a time period which can be 1s, 2s or 1min, and the time period is determined according to actual experience.
For example, according to the historical data of the traffic flow of the device to be tested, it may be determined that the traffic flow of the device to be tested in the 1 st to 3 rd s is a smaller floating trend, the traffic flow in the 3 rd to 20 th s is a linear increase, the traffic flow in the 21 st to 40 th s is suddenly decreased, and the traffic flow in the 21 st to 40 th s is exponentially increased, and then a preset period may be set in the 1 st to 40 th s, which is the 1 st, 2 nd, 3 rd, 20 th, 21 st, 40 th s, and further the traffic flow in the 1 st, 2 nd, 3 rd, 20 th, 21 st, 40 th s may be determined as shown in table 1.
TABLE 1
Step 202, determining second traffic for testing in each testing period according to the first traffic in the plurality of preset periods;
Determining a second service flow of each test period according to the acquired first service flows of the preset periods, wherein two adjacent preset periods in the preset periods can be continuous or discontinuous, such as the 1 st and 2 nd preset periods are adjacent and continuous, and the 3 rd and 20 th preset periods are adjacent and discontinuous in table 1; two adjacent test periods of the plurality of test periods are each continuous.
In specific implementation, whether two adjacent preset time periods in a plurality of preset time periods are continuous or not can be determined, for the two adjacent and continuous preset time periods, the two preset time periods can be corresponding to two test time periods, and the first service flow of each preset time period is respectively determined as the second service flow of each preset time period corresponding to the test time period; for two adjacent but discontinuous preset time periods, determining a plurality of test time periods according to the two preset time periods, and determining a second service flow of each test time period in the plurality of test time periods according to the first service flow of the two preset time periods.
As in table 1, if the two preset periods of 1s and 2s are adjacent and continuous, the 1 st and 2 nd s may be determined as two test periods, respectively, and the first traffic 50, 51 corresponding to the 1 st and 2 nd s (preset period) may be determined as the second traffic 50, 51 corresponding to the 1 st and 2 nd s (test period), respectively. The 3s and 20s preset time periods are adjacent but discontinuous, the 3s, 4s, 5s, 6s … … s, 19s and 20s can be respectively determined as test time periods according to the 3s and 20s, and the 3s, 4s, 5s, 6s … …, 19s and 20s second service flows are respectively determined according to the first service flows 51 and 200 respectively corresponding to the 3s and 20 s.
When determining the second traffic of each test period according to the first traffic of two preset periods, specifically, the trend rule of the historical traffic of the period between the two preset periods in the historical data of the device to be tested can be determined first, for example, the traffic between the two preset periods is linearly increased, exponentially increased, linearly decreased, and the like, so that the second traffic of each test period is determined according to the trend rule and the first traffic of the two preset periods.
When the trend rule of the historical traffic in the period between the two preset periods is linear change, the second traffic in each test period can be determined through the formula (1).
Wherein, formula (1) is:
Wherein B 1 is the first traffic flow of the previous preset period of the two preset periods, B 2 is the first traffic flow of the next preset period of the two preset periods, A 1 is the previous preset period of the two preset periods, A 2 is the next preset period of the two preset periods, A 1 +K is the Kth test period of the periods between the two preset periods, The second service flow of the test period A 1 +K;
Still referring to the above example, the second traffic of the test period 3s, that is, the first traffic of the preset period 3s, and the second traffic of the test period 20s, that is, the first traffic of the preset period 20 s; determining a second traffic flow of a test period between two preset periods according to a first traffic flow of the preset period 3s and a first traffic flow of the preset period 20s, wherein the test periods 4s, 5s and 6s … … and 19s are respectively the first, second, third, … … and 16 test periods between the 3s and 20s, for example, the second traffic flow of the test period 4s is calculated, and then Similarly, the second traffic corresponding to the 5 th, 6 th, … … th and 19 th test periods may be as shown in table 2.
TABLE 2
In the above example, 21s, 22s, 23s, 24s … …, 39s, and 40s may be further determined as test periods according to 21s and 40s, respectively, and second traffic flows of 21s, 22s, 23s, 24s … …, 39s, and 40s may be determined according to first traffic flows 105 and 300 corresponding to 21s and 40s, respectively. For example, the traffic flow corresponding to each test period that is finally generated is shown in table 3.
TABLE 3 Table 3
And 203, starting a thread for sending a test task to the device to be tested according to the second service flow of each test period, and performing pressure test on the device to be tested.
In the embodiment of the invention, the performance of the device to be tested can be tested in two ways, one is to test the performance of the device to be tested by adopting the user concurrency index, and the other is to test the performance of the device to be tested by adopting the TPS index.
Specifically, when the performance of the device to be tested is tested by using the user concurrency index, the second service flow is the user concurrency number, the number N of the started threads can be determined according to the maximum user concurrency number in the user concurrency numbers of each test period, wherein N is a positive integer, after the N threads are started, M threads corresponding to the user concurrency number of the test period can be called in the started N threads according to the user concurrency number of the test period, so that each of the M threads continuously sends test tasks to the device to be tested in the test period, M is a positive integer, and M is less than or equal to N. For example, if the maximum user concurrency number in the user concurrency numbers of each test period is determined to be 300, it may be determined that 300 threads are started, each thread may be marked with an index number, and when the actual service flow of the device to be tested is 50 user concurrency numbers in the 1 st s, the second service flow for testing is 50 user concurrency numbers, threads with index numbers of 0 to 49 may be started, and each thread is used for continuously sending test tasks to the device to be tested, so as to simulate that the device to be tested receives task requests sent by 50 users together in the 1 st test period.
In the actual use process, after the test device starts the threads, each started thread judges whether to send a test task to the device to be tested every 10ms, if so, the test task is sent to the device to be tested, otherwise, the test task can be judged again after being delayed for 10 ms.
When the performance of the device to be tested is tested by adopting TPS indexes, the second service flow is TPS, the number N of the starting threads can be determined according to the maximum TPS in TPS of each test period, wherein N is a positive integer, after the N threads are started, M threads corresponding to the TPS of the test period can be called in the started N threads according to the TPS of the test period, so that each thread in the M threads sends a preset number of test tasks to the device to be tested in the test period, wherein M is a positive integer, and M is less than or equal to N. For example, if it is determined that the maximum TPS in TPS of each test period is 1000, 200 threads may be started, each thread may be marked with an index number, and when the actual TPS of the device to be tested is 250 in the 1 st s, the second traffic flow for testing is 250TPS, threads with index numbers of 0 to 49 may be started, each thread is used for sending 5 test tasks to the device to be tested, 250 test tasks are sent in total, after the test device determines that 250 test tasks are sent to the device to be tested, sending test tasks to the device to be tested may be stopped, so that the device to be tested is simulated to receive 250 test tasks in the 1 st test period. Here, the number of test tasks sent by each of the M threads to the device under test may be the same or different, and is not limited herein.
In the above embodiment, by collecting the service flows actually generated by the device to be tested in a plurality of preset time periods, determining the service flows of the device to be tested for testing in each test time period, and using the determined service flows of each test time period for pressure testing the device to be tested, the service flows carried by the device to be tested in a real scene can be simulated, so that the performance of the device to be tested in the real scene can be accurately evaluated.
Based on the same inventive concept, fig. 3 illustrates an exemplary structure of a pressure testing apparatus provided in an embodiment of the present invention, which may perform a flow of a pressure testing method.
The device comprises:
An acquisition unit 301 and a processing unit 302;
the acquisition unit 301 is configured to acquire first traffic flows actually occurring in a plurality of preset periods of time by a device to be tested;
a processing unit 302, configured to determine a second traffic flow for testing in each testing period according to the first traffic flows in the plurality of preset periods; and starting a thread for sending a test task to the device to be tested according to the second service flow of each test period, and performing pressure test on the device to be tested.
Optionally, the processing unit 302 is specifically configured to:
The following operations are performed for any adjacent two preset periods of the plurality of preset periods:
If the two preset time periods are continuous, determining the first service flow of each preset time period as the second service flow of the corresponding test time period of each preset time period;
If the two preset time periods are discontinuous, determining a plurality of test time periods according to the two preset time periods, and determining second service flow of each test time period according to first service flow of the two preset time periods.
Optionally, the processing unit 302 is specifically configured to:
determining a trend rule of the historical service flow in the period between the two preset periods in the historical data;
and determining the second service flow of each test period according to the trend rule and the first service flow of the two preset periods.
Optionally, the trend rule is a linear change;
The processing unit 302 is specifically configured to:
Determining a second traffic flow for each test period according to formula (1);
The formula (1) is:
Wherein B 1 is the first traffic flow of the previous preset period of the two preset periods, B 2 is the first traffic flow of the next preset period of the two preset periods, A 1 is the previous preset period of the two preset periods, A 2 is the next preset period of the two preset periods, A 1 +K is the Kth test period of the periods between the two preset periods, The second service flow of the test period A 1 +K;
optionally, the second traffic flow is a user concurrency number;
The processing unit 302 is specifically configured to:
Starting N threads; n is determined by the maximum user concurrency number in the user concurrency numbers of each test period;
For any test period, according to the user concurrency number of the test period, invoking M threads corresponding to the user concurrency number of the test period, so that each thread in the M threads continuously transmits a test task to the device to be tested in the test period; n is a positive integer, M is a positive integer, and M is less than or equal to N.
Optionally, the second service flow is a transaction number TPS per second;
The processing unit 302 is specifically configured to:
starting N threads; n is determined by the largest TPS in TPS of each test period;
For any test period, according to the TPS of the test period, M threads corresponding to the TPS of the test period are called, so that each thread in the M threads sends a preset number of test tasks to the device to be tested in the test period; n is a positive integer, M is a positive integer, and M is less than or equal to N.
Based on the same inventive concept, an embodiment of the present invention further provides a computing device, including:
a memory for storing program instructions;
And the processor is used for calling the program instructions stored in the memory and executing the pressure test method according to the obtained program.
Based on the same inventive concept, the embodiments of the present invention also provide a computer-readable nonvolatile storage medium including computer-readable instructions, which when read and executed by a computer, cause the computer to perform the method of pressure testing described above.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (9)

1. A method of pressure testing, comprising:
Collecting first service flow which actually occurs in a device to be tested in a plurality of preset time periods;
Determining second service flow for testing in each testing period according to the first service flow in the plurality of preset periods;
Starting a thread for sending a test task to the device to be tested according to the second service flow of each test period, and performing pressure test on the device to be tested;
the determining the second traffic for testing in each testing period according to the first traffic in the plurality of preset periods includes:
The following operations are performed for any adjacent two preset periods of the plurality of preset periods:
if the two preset time periods are discontinuous, determining a trend rule of the historical service flow of the time period between the two preset time periods in the historical data; and determining the second service flow of each test period according to the trend rule and the first service flow of the two preset periods.
2. The method of claim 1, wherein the determining the second traffic for testing for each test period from the first traffic for the plurality of preset periods further comprises:
if the two preset time periods are continuous, the first service flow of each preset time period is determined to be the second service flow of the corresponding test time period of each preset time period.
3. The method of claim 1, wherein the trend law is a linear change;
The second service flow of each test period is determined, and the second service flow accords with the formula (1);
The formula (1) is:
Wherein B 1 is the first traffic flow of the previous preset period of the two preset periods, B 2 is the first traffic flow of the next preset period of the two preset periods, A 1 is the previous preset period of the two preset periods, A 2 is the next preset period of the two preset periods, A 1 +K is the Kth test period of the periods between the two preset periods, And the second service flow of the test period A 1 +K.
4. A method according to any of claims 1-3, wherein the second traffic volume is a number of user concurrency;
starting a thread for sending a test task to the device to be tested according to the second service flow of each test period, and performing a pressure test on the device to be tested, including:
Starting N threads; n is determined by the maximum user concurrency number in the user concurrency numbers of each test period;
For any test period, according to the user concurrency number of the test period, invoking M threads corresponding to the user concurrency number of the test period, so that each thread in the M threads continuously transmits a test task to the device to be tested in the test period; n is a positive integer, M is a positive integer, and M is less than or equal to N.
5. A method according to any of claims 1-3, wherein the second traffic flow is a transaction number TPS per second;
starting a thread for sending a test task to the device to be tested according to the second service flow of each test period, and performing a pressure test on the device to be tested, including:
starting N threads; n is determined by the largest TPS in TPS of each test period;
For any test period, according to the TPS of the test period, M threads corresponding to the TPS of the test period are called, so that each thread in the M threads sends a preset number of test tasks to the device to be tested in the test period; n is a positive integer, M is a positive integer, and M is less than or equal to N.
6. A pressure testing apparatus, comprising:
the device comprises an acquisition unit and a processing unit;
the acquisition unit is used for acquiring first service flow which actually occurs in a plurality of preset time periods of the device to be tested;
The processing unit is used for determining second service flow for testing in each testing period according to the first service flow in the plurality of preset periods; starting a thread for sending a test task to the device to be tested according to the second service flow of each test period, and performing pressure test on the device to be tested;
The processing unit is specifically configured to, when determining the second traffic for testing in each testing period according to the first traffic in the plurality of preset periods:
The following operations are performed for any adjacent two preset periods of the plurality of preset periods:
if the two preset time periods are discontinuous, determining a trend rule of the historical service flow of the time period between the two preset time periods in the historical data; and determining the second service flow of each test period according to the trend rule and the first service flow of the two preset periods.
7. The apparatus of claim 6, wherein,
The processing unit is further configured to, when determining the second traffic for testing in each testing period according to the first traffic in the plurality of preset periods:
if the two preset time periods are continuous, the first service flow of each preset time period is determined to be the second service flow of the corresponding test time period of each preset time period.
8. A computing device, comprising:
a memory for storing program instructions;
A processor for invoking program instructions stored in said memory to perform the method of any of claims 1-5 in accordance with the obtained program.
9. A computer readable non-transitory storage medium comprising computer readable instructions which, when read and executed by a computer, cause the computer to perform the method of any of claims 1 to 5.
CN201911069384.1A 2019-11-05 2019-11-05 Pressure testing method and device Active CN110865913B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911069384.1A CN110865913B (en) 2019-11-05 2019-11-05 Pressure testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911069384.1A CN110865913B (en) 2019-11-05 2019-11-05 Pressure testing method and device

Publications (2)

Publication Number Publication Date
CN110865913A CN110865913A (en) 2020-03-06
CN110865913B true CN110865913B (en) 2024-05-03

Family

ID=69654339

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911069384.1A Active CN110865913B (en) 2019-11-05 2019-11-05 Pressure testing method and device

Country Status (1)

Country Link
CN (1) CN110865913B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112968806B (en) * 2021-01-27 2022-09-02 杭州朗和科技有限公司 Service scene testing method and device, storage medium and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101211311A (en) * 2006-12-25 2008-07-02 中国电信股份有限公司 Performance prediction method for application software in manufacturing environment
CN106067043A (en) * 2016-06-01 2016-11-02 重庆中科云丛科技有限公司 A kind of performance test methods and system
CN106230651A (en) * 2016-07-12 2016-12-14 众安在线财产保险股份有限公司 The pressure testing system of a kind of internet system and method
CN107220165A (en) * 2016-03-21 2017-09-29 阿里巴巴集团控股有限公司 The method and apparatus of pressure test on a kind of artificial line
CN107451048A (en) * 2016-03-31 2017-12-08 阿里巴巴集团控股有限公司 The method and apparatus of pressure simulation test on a kind of line
CN109309596A (en) * 2017-07-28 2019-02-05 阿里巴巴集团控股有限公司 A kind of method for testing pressure, device and server
CN110245089A (en) * 2019-06-21 2019-09-17 深圳前海微众银行股份有限公司 Method for testing pressure, device, equipment and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090083585A1 (en) * 2007-09-21 2009-03-26 Inventec Corporation Method of pressure testing for peripheral component interconnect (pci) bus stage
US10621075B2 (en) * 2014-12-30 2020-04-14 Spirent Communications, Inc. Performance testing of a network segment between test appliances

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101211311A (en) * 2006-12-25 2008-07-02 中国电信股份有限公司 Performance prediction method for application software in manufacturing environment
CN107220165A (en) * 2016-03-21 2017-09-29 阿里巴巴集团控股有限公司 The method and apparatus of pressure test on a kind of artificial line
CN107451048A (en) * 2016-03-31 2017-12-08 阿里巴巴集团控股有限公司 The method and apparatus of pressure simulation test on a kind of line
CN106067043A (en) * 2016-06-01 2016-11-02 重庆中科云丛科技有限公司 A kind of performance test methods and system
CN106230651A (en) * 2016-07-12 2016-12-14 众安在线财产保险股份有限公司 The pressure testing system of a kind of internet system and method
CN109309596A (en) * 2017-07-28 2019-02-05 阿里巴巴集团控股有限公司 A kind of method for testing pressure, device and server
CN110245089A (en) * 2019-06-21 2019-09-17 深圳前海微众银行股份有限公司 Method for testing pressure, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN110865913A (en) 2020-03-06

Similar Documents

Publication Publication Date Title
CN108833458B (en) Application recommendation method, device, medium and equipment
EP3734475A1 (en) Method and device for training data, storage medium, and electronic device
CN110471821B (en) Abnormality change detection method, server, and computer-readable storage medium
US20160041848A1 (en) Methods and Apparatuses for Determining a Leak of Resource and Predicting Usage Condition of Resource
CN106383764B (en) A kind of collecting method and equipment
CN106708621B (en) Method and device for obtaining application cluster capacity
CN109145981B (en) Deep learning automatic model training method and equipment
CN112104912B (en) Method, device and equipment for detecting video watching completion degree and readable storage medium
CN109558329A (en) A kind of program detecting method, device, equipment and readable storage medium storing program for executing
CN105279386A (en) Method and device for determining index abnormal data
CN110865913B (en) Pressure testing method and device
CN107220165A (en) The method and apparatus of pressure test on a kind of artificial line
CN110795324A (en) Data processing method and device
CN110955390A (en) Data processing method and device and electronic equipment
EP2960796A1 (en) System and method of non-intrusive measurement of memory access profiles of threads in a multi-core processor
CN109948436A (en) The method and device of vehicle on a kind of monitoring road
CN109858632B (en) Method and device for determining threshold
CN111984624B (en) Method and system for data migration through correction migration model
CN111625358B (en) Resource allocation method and device, electronic equipment and storage medium
CN108874657A (en) The method, apparatus and computer storage medium that recognition of face host is tested
CN107122303B (en) Test method and device
CN108804640B (en) Data grouping method, device, storage medium and equipment based on maximized IV
CN117435474A (en) Test method and device and computing equipment
CN108268347B (en) Physical equipment performance testing method and device
CN110888811A (en) Code coverage rate information processing method and device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant