Re: Recording asynchronous request/response times
Gary Mulder <[email protected]> Tue, 26 May 2015 10:53:53 +0100
| Newsgroups | gmane.comp.java.grinder.user |
|---|---|
| Message-ID | <CAKy9zTDiQkYRpcSRWgEhZpLYH79YePteD9pk2kt_q=RP9Qh-og@mail.gmail.com> |
Hi Niklas, On 26 May 2015 at 08:16, nmodin <[email protected]> wrote: > Hi all, > > I need to record the time between requests and responses for a web socker > server I have and can't really figure out how to achieve this. I have a > The Grinder is more designed for pull testing than the push testing required for web sockets. If you want to test the horizontal scalability of your web sockets you need to get a lot of threads subscribed to your web socket and then wait for messages. Depending on the number of sockets, you may find that if you send a lot of messages (> 50 per Grinder process) simultaneously to your test harness then all the test threads will need to wake up at the same time, which causes thread contention and possible GC in your test harness. See http://grinder.sourceforge.net/g3/garbage-collection.html for details on how to monitor and tune GC. If you want to test latency and not scalability of your web sockets, you could import your small java client into The Grinder as a callable class and generate time stamps as part of the web socket payload you are injecting. On the receiving thread look at the time stamp to calculate how long it took from send to receive. You can use a custom statistic to log the latency ( http://stackoverflow.com/questions/23452976/how-to-add-custom-statistics-in-grinder ). Of course you probably want to know the latency of your web sockets when you have your peak web socket connections. In the end you may spend a lot of time confirming your test harness is not the bottleneck. One solution to this is to use a lot of agents, e.g. run them in the cloud. Regards, Gary ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ grinder-use mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/grinder-use