diff --git a/docs/retrieving-stats.rst b/docs/retrieving-stats.rst index 823cf9cb93..023013b6f2 100644 --- a/docs/retrieving-stats.rst +++ b/docs/retrieving-stats.rst @@ -21,10 +21,9 @@ By default only the Aggregate row is appended regularly to the history stats, bu the ``--csv-full-history`` flag, a row for each stats entry (and the Aggregate) is appended every time the stats are written (once every 2 seconds by default). -You can also customize how frequently this is written if you desire faster (or slower) writing: +You can also customize how frequently this is written: .. code-block:: python import locust.stats locust.stats.CSV_STATS_INTERVAL_SEC = 5 # default is 1 second - locust.stats.CSV_STATS_FLUSH_INTERVAL_SEC = 60 # Determines how often the data is flushed to disk, default is 10 seconds diff --git a/locust/stats.py b/locust/stats.py index 3258155d4e..f3d9886338 100644 --- a/locust/stats.py +++ b/locust/stats.py @@ -113,7 +113,7 @@ def resize_handler(signum: int, frame: FrameType | None): """Default interval for how frequently CSV files are written if this option is configured.""" CSV_STATS_INTERVAL_SEC = 1 -CSV_STATS_FLUSH_INTERVAL_SEC = 10 +CSV_STATS_FLUSH_INTERVAL_SEC = 5 """ Default window size/resolution - in seconds - when calculating the current