During performance testing, most projects are composed of more than two scenarios (more than two scripts, in hybrid scenarios, how do I set the number of virtual users of different scripts based on the service proportion?
Assume that there are two types of scripts a and B (business). After research, we know that the ratio of A and B is: 40%, 60%.
A common practice is to set the proportion of virtual users (A is 40%, B is 60%) based on the business proportion.
This method is relatively simple, but in fact, although the user-to-Business ratio is the same, the TPS ratio of the two is usually not the same, therefore, the proportion of transactions completed per unit time is different from the business proportion, which does not really meet the requirements. therefore, this approach is not accurate.
The following describes a more accurate method:
First, set the scenario, and set the scripts A and B to run with a single user. Observe the Real-Time TPS at this time. If the TPS difference between the two is small, assume that the TP of script a is n times that of script B. If n> 10, add the pacing value 0.001 to run-time-setting of script a, and then run the script, for example, N> 10, increase the pacing value until the ratio of N to N is less than 10. Suppose we finally adjust n to 5,
Then, according to their business ratio and TPS multiples, because a single user TPS of script a is five times that of single user of script B, and the Business proportion is 40%, 60%, that is, so we know that the ratio of user a to user B is. 5. we set one user for script a, eight users for script B, and run the scenario to see if their TP is close? If yes, increase the number of users according to the proportional gradient. Run the hybrid scenario! Until a script does not increase TPS as the number of users increases, or a failed transaction occurs, or the server resource usage increases, the performance inflection point can be considered.