Little's Law in Performance Testing
Workload modelling is an important part of performance test planning. Accuracy of your workload model result into an accurate performance report.
Little's Law is a very useful to define the workload model in performance testing.According to the Little's Law:
N=TPS*(RT+TT+PT)
N = No of users (Expected virtual users)
TPS= Transaction per second. ( if you have TPH-Transaction Per Hour value, divide it by 3600 to convert in to TPS).
RT= Total execution time of a script( This include end to end execution time of script without think time and pacing)
TT= Total Think Time in the script ( Sum of think time between all the transactions)
PT= Pacing Time ( It is pause time between two iterations, After end of previous iteration and before start of new iteration)
Calculating no of users using Little's law:
Suppose we have an application with submit claim workflow. Client has given a requirement that they want to achieve 6000 claim submittion in an hour with think time of 5 seconds between each transaction (suppose we have total 5 transactions in script action including login and logout) and pacing of 10 seconds. Assume that script take 30 seconds to execute without think time and pacing. Calculate no of virtual users to achieve the desired output.
As per the little's law,
TPS = 6000/3600 = 1.667
RT= 30
TT= 20 ( As we have total 5 transactions, there will be four instances of think time hence 5*4)
Pacing = 10
N = 1.667 * (30+20+10)
N = 1.667 * 60
N = 100
Value of total no of virtual users is 100.
i could not understand TT time as 20.how it will become 20.
ReplyDeleteThere are totally 5 transactions and think time of 5 seconds needs to be added after each transaction except the last transaction which is logout. And so the total think time is 5*4 which is 20
Deletetotal 5 transactions - Think time can be updated in 4 places =s0 4*5=20
ReplyDeleteTransaction1
5 sec(think time)
Transaction2
5 sec(think time)
Transaction3
5 sec(think time)
Transaction4
5 sec(think time)
Transaction5