Observing "custom" response times for SSE


I got a stream that can be read by SSE requests. In that context, what is interesting is not the the delay between request and response, but the delay between data emission and reception. And I want to see how having many users creating load on the application by requesting the same stream has an effect on it (and gatling is just perfect to describe load scenarios !).

For each event, I’ve got an “emission_datetime” field and I want to measure the delay between it and the reception time, then having stats on that.

I looked a bit in the source code what I could adapt for that. I found many leads, like HttpResponseTimeCheckMaterializer, CheckBuilder, io.gatling.http.action.sse.Sse, … but it looks difficult to just extend classes and traits, and modify behaviour that way.

What would be the best way to replace in my code the traditionnal request/response delay statistic report with that other kind of delay measurement ?

Thank you !