From 2939120426fb8b7660458e102d2252546ede8bf0 Mon Sep 17 00:00:00 2001 From: Andrew Baldwin Date: Wed, 5 Jun 2024 13:00:50 -0400 Subject: [PATCH] Add WORKER_LOG_REPORT_INTERVAL as configurable --- docs/configuration.rst | 12 ++++++++++++ locust/runners.py | 3 +++ 2 files changed, 15 insertions(+) diff --git a/docs/configuration.rst b/docs/configuration.rst index 1ce0247067..808a49ba12 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -274,3 +274,15 @@ The list of statistics parameters that can be modified is: +-------------------------------------------+--------------------------------------------------------------------------------------+ | PERCENTILES_TO_STATISTICS | List of response time percentiles in the screen of statistics for UI | +-------------------------------------------+--------------------------------------------------------------------------------------+ + +Customization of additional static variables +============================================ + +This table lists the constants that are set within locust and may be overridden. + ++-------------------------------------------+--------------------------------------------------------------------------------------+ +| Parameter name | Purpose | ++-------------------------------------------+--------------------------------------------------------------------------------------+ +| locust.runners.WORKER_LOG_REPORT_INTERVAL | Interval for how frequently worker logs are reported to master. Can be disabled | +| | by setting to a negative number | ++-------------------------------------------+--------------------------------------------------------------------------------------+ diff --git a/locust/runners.py b/locust/runners.py index f2443dce2e..5118348356 100644 --- a/locust/runners.py +++ b/locust/runners.py @@ -1423,6 +1423,9 @@ def stats_reporter(self) -> NoReturn: gevent.sleep(WORKER_REPORT_INTERVAL) def logs_reporter(self) -> None: + if WORKER_LOG_REPORT_INTERVAL < 0: + return + while True: current_logs = get_logs()