diff --git a/locust/main.py b/locust/main.py index 9c0bdc2cd9..f5819d2704 100644 --- a/locust/main.py +++ b/locust/main.py @@ -341,6 +341,8 @@ def spawn_run_time_quit_greenlet(): stats_printer_greenlet = gevent.spawn(stats_printer(runner.stats)) stats_printer_greenlet.link_exception(greenlet_exception_handler) + gevent.spawn(stats_history, runner) + def start_automatic_run(): if options.master: # wait for worker nodes to connect @@ -408,8 +410,6 @@ def start_automatic_run(): if options.csv_prefix: gevent.spawn(stats_csv_writer.stats_writer).link_exception(greenlet_exception_handler) - gevent.spawn(stats_history, runner) - def shutdown(): """ Shut down locust by firing quitting event, printing/writing stats and exiting