From 945dd96e3018c93ea609c4280252637da5a07934 Mon Sep 17 00:00:00 2001 From: williamlhunter Date: Tue, 6 Aug 2019 17:43:19 -0500 Subject: [PATCH] added the total stats back to the end of stats if they are truncated --- locust/web.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/locust/web.py b/locust/web.py index 97c87f1a49..2c3728176f 100644 --- a/locust/web.py +++ b/locust/web.py @@ -123,6 +123,8 @@ def request_stats(): # Truncate the total number of stats and errors displayed since a large number of rows will cause the app # to render extremely slowly. Aggregate stats should be preserved. report = {"stats": stats[:500], "errors": errors[:500]} + if len(stats) > 500: + report["stats"] += [stats[-1]] if stats: report["total_rps"] = stats[len(stats)-1]["current_rps"]