Return some sort of results map in core/run-simulation
Closed this issue · 5 comments
Hi there!
First of all thanks for writing this tool! Simple and lightweight =)
We are doing some experiments on my current project and one thing we felt missing was the ability to fail the performance run if any (or some arbitrary number of) request failed.
We are currently re-parsing the simulation log to do that, but it would be cool if core/run-simulation returned some sort of map for the results, so we can easily do any post processing we want in Clojure. I am more than willing to write the pull requests for this, but I would love to discuss and validate the idea first.
Thanks. Parsing the simulation log files does not sound handy at all. I agree that it would be better to have a return value from core/run-simulation. That said, if clj-gatling returns all results it would also consume too much memory. So either returning the results should be an optional feature or then the return value should be some kind of summary.
I think returning the summary would work well. So something like
{"scenario1": {"requests1" {:succeeded 1898 :failed 2}}}
Would that work in your case or do you need full results?
Yeah, that would be great, don't really need info of reach request.
It would be cool to get the aggregated percentiles information as well (i.e 80% of the requests completed in 10ms), dunno if that is easy to extract from the gatling libraries or not.
Yep. Getting aggregated percentiles from gatling requires some investigation. I agree that would be useful.However, it's a good start if we get even the number of succeeded & failed first. I can make a new release out of that and then later next incremental step is those percentiles etc.
At the moment, I'm busy at trying to fix another issue (#10). I would be more than happy if you have time on this issue and could help with PR?
@marcosccm have you had time to do something about this? If not, I could start implementing this soon.
Version 0.7.10 returns following simple summary
{:ok 5 :ko 1}