Closed byronh closed 7 years ago
You could do this by overriding this block of code: https://github.com/locustio/locust/blob/master/locust/runners.py#L41-L46
I'm re-opening this issue because it keeps popping up, so it might be good to provide an option for turning off the resetting of the stats.
Until a solution has been implemented, here's a workaround that I posted in #236, that monkey patches Locust and disables stats resetting (will also make the "Reset stats" button in the web UI not work):
from locust.stats import RequestStats
def noop(*arg, **kwargs):
print "Stats reset prevented by monkey patch!"
RequestStats.reset_all = noop
Run into the same issue today. Hope it will be fixed soon. :)
I'm also in favor of this setting.
The requests in on_start() are part of what I want to measure
+1
+1
+1
+1
This was implemented on master a few days ago, see the changelog and the previous commits: https://github.com/locustio/locust/commit/c61d3bbaaaaf1ae09edbc74f4524992a5821c1b0
thanks @alexandrul
How does one prevent the stats from being automatically reset once all locusts are hatched? I understand that this is the intended behavior of Locust, but for my particular use case I need the stats not to be reset.
What is the recommended workaround for this?