Gatling : Any thoughts on writing response into a file ,will it be thread safe and will it be an overhead for load test time or overall performance

Viewed 169

I need to save response from my two tests which give two variations . I need to calculate the ratio of the response received.

response 1
{
    "var1": "a1"
}

response 2
{
    "var1": "b1"
}

I was thinking about writing the response into files and then write a method to read those files and calculate the ratios. Is there any other way to do so in gatling?

1 Answers

Gatling stores its results in target/gatling/<simulation>. This folder also contains the raw log file <logfile>.log that you can parse yourself after the run. Note that you can only differentiate between different requests, it doesn't log the returned responses, from your description I'm not sure whether this fits your needs.

Gatling already has a parser for the logfile with which you should be able to easily interface, it's used for the generation of gatlings fancy log reports here: https://github.com/gatling/gatling/blob/master/gatling-charts/src/main/scala/io/gatling/charts/stats/LogFileReader.scala.

I also wrote a much simpler parser myself, if you're interested I can put it on github.

Related