Asynchronous Load Generator

1.5k views Asked by At

I'm trying to write asynchronous load generator in Java using Jetty's HttpClient as it provides Asynchronous communication.

But i'm facing some problems. The major of which is that for generating load i had used java.util.TimerTask. But the problem with TimerTask class is that it does not guarantees accuracy in time i.e. certain miliseconds from the expected time might be more. Due to this, if i try to generate 1000 tps i will be getting only around 700-800 tps.

Can anyone suggest me how to overcome this issue. Is there any implement that i can use as reference ??

2

There are 2 answers

0
Dan Hardiker On

I would use Apache JMeter for this task.

0
user267116 On

I was facing a similar problem and resolved it using the following approach. Instead of using Timer, or using sleep, you should probably start scheduling calls using Scheduled Executor Service and then you will most likely will be able to achieve the required TPS.