Replacement of DataWriterClient

Hello everybody,

I try to implement my own extension to Gatling 2.2.1. Basically, I follow the example here [1] and here [2].
When it comes to saving the results of my execution, I have a problem.
The post in [1] states that I should extend the interface DataWriterClient, which no longer exists.
The code in [2] and the old Gatling documentation [3] mention a static method within DataWriter.
Both options seems to have disappeared in the 2.1.x and 2.2.x branches and I did not manage to find out how e.g. gatling-http publish their results.

Could you please tell me what’s the replacement of DataWriterClient and how I can log start time, end time, etc.?



Hi Ronny,

Haven’t tried this myself but I found the following article - it takes you through creating a custom protocol in Gatling 2.2.x - looks like statsEngine is the way things work now with regard to logging results.

Please share whatever you come up with if possible - I always find examples are the best way to learn!

Hope this helps!


Hi Barry,

thank you for pointing out the article. It showed my the right way.
If anyone ever has the same problem, here’s the solution:

The own class that extends ActionBuilder can retrieve a StatsEngine object by calling ctx.coreComponents.statsEngine, where ctx is the ScenarioContext that is passed to build(). The statsEngine then can be passed to the Action object and used to log the statistics.

If you’re interested in what I’m doing, you can check it out here [1]. I don’t know if it’s really necessary that I write my own Gatling extension but at least I’m having fun :wink: