From 7d366d09d37d1ee625f02c50b40cb72c40f03655 Mon Sep 17 00:00:00 2001 From: Lars Holmberg Date: Thu, 20 Aug 2020 15:00:06 +0200 Subject: [PATCH] fix #1531 (taken from https://github.com/taojy123/locust/commit/ce0e4d9f74884ce85fa6a3fce5de3b4ff257c112) --- locust/stats.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/locust/stats.py b/locust/stats.py index 76a1ad5f45..915c3ec14d 100644 --- a/locust/stats.py +++ b/locust/stats.py @@ -759,6 +759,8 @@ def stats_history(runner): """Save current stats info to history for charts of report.""" while True: stats = runner.stats + if not stats.total.use_response_times_cache: + break r = { 'time': datetime.datetime.now().strftime("%H:%M:%S"), 'current_rps': stats.total.current_rps or 0,