Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to calculate TPS

I have to built an application in java which will handle load testing on a particular application. Here we can give certain parameters like TPS (Transaction Per Second) Time (in secs) and Number of Request. I am giving you some scenario like TPS = 5 Time=100 No of Request=500. Or TPS=10 Time=100 No of request=1000

But this request I have sent using multiple Thread so the process can give the fill of concurrent transaction. My question is how to create the logic to create this. I am developing my program in java.

like image 951
Abhisek Avatar asked Aug 01 '11 10:08

Abhisek


People also ask

What is TPS rate?

Transactions per second (TPS) refers to how many transactions the network can process in a second, followed by how rapidly the network can confirm a trade or an exchange. The average transaction speed is significant because it indicates the network's current capacity to process transactions.

What is TPS in performance testing?

Various contributors. Often we see a web application measured by throughput. It's a way of quantifying the volume of requests/responses in relation to time. Transactions per second or TPS is the most common ratio used. A performance test plan usually contains certain throughput goals.

What is TPS in API?

An API's processing limits are typically measured in a metric called TPS (Transactions Per Second), and API rate limiting is essentially enforcing a limit to the number of TPS or the quantity of data users can consume. That is, we either limit the number of transactions or the amount of data in each transaction.


1 Answers

Suppose you want to run 50 TPS for 100 seconds. You can have 5 threads that would send 1 transaction every 100 ms for 100 seconds. You,however, want to randomize the process little bit to prevent threads sending transactions at the same time. So the process for each tread would be

  • Send a transaction
  • Wait random time between 1 and 199 ms inclusive (to average 100ms)
  • Repeat as long as required

That will give you average 50 TPS reasonably distributed in time. You can play around with thread count and other numbers to achieve your specific goal.

like image 172
Alex Gitelman Avatar answered Sep 17 '22 21:09

Alex Gitelman