Latency/elapse time not recorded when websocket response has multiple frames

Issue #241 closed
Sophia Xie created an issue

Hi Peter, your plugin worked great except I found it’s not measuring the latency for each frames if I’m using the while loop to receive all of the response frames from a single websocket request. I did put in a transaction controller and inside included the request + read first frame + while loop to read all of the rest of the frames until a ${__jexl3(! ${websocket.last_frame_final},)} was met. All of the WebSocket Single Read samplers are returning with 0 as the latency and as a result the transaction controller’s latency is only capturing the request’s loadtime (the websocket single write sampler). Do you have a special way to resolve this issue? I’m sure I’m not the only one facing it. Many thanks.

Comments (5)

  1. Peter Doornbosch repo owner

    Hi,

    The plugin does not set latency at all.

    Do you really need “latency”? Is “sample time” not enough for your use case?

  2. Sophia Xie reporter

    Hi Peter,

    Thanks very much for the reply! I should’ve closed this ticket earlier. I’ve done some snooping of the traffic last week and closed out the doubt about the mis-reporting of the “sample time” reported by jMeter. You are right, the timing reported by jmeter is good enough. If there’s anything that could be done better would be to have a real websocket sampler to stitch all of the frames together as one payload instead of having multiple individual read frame “sampler”, which made the throughput control and reporting a lot harder, but I understand it might involve some difficulties.

    Best,

    Sophia

  3. Peter Doornbosch repo owner

    Hi Sophia,

    Thanks for your response and feedback.

    You are right, it would be nice if the plugin could read the whole message at once in case of fragmentation. If I only had time…..

    Cheers
    Peter

  4. Log in to comment