From 5c8fed8c5b1e6861f972ab7e7eb049e912d5a29b Mon Sep 17 00:00:00 2001 From: HB Date: Thu, 16 Apr 2020 22:04:11 +0200 Subject: [PATCH] fixed double consideration of same time stamp when calculating current response time percentile --- locust/stats.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/locust/stats.py b/locust/stats.py index a6acbf6d14..8ba010ab62 100644 --- a/locust/stats.py +++ b/locust/stats.py @@ -542,7 +542,8 @@ def get_current_response_time_percentile(self, percent): # that it's ordered by preference by starting to add t-10, then t-11, t-9, t-12, t-8, # and so on acceptable_timestamps = [] - for i in range(9): + acceptable_timestamps.append(t-CURRENT_RESPONSE_TIME_PERCENTILE_WINDOW) + for i in range(1, 9): acceptable_timestamps.append(t-CURRENT_RESPONSE_TIME_PERCENTILE_WINDOW-i) acceptable_timestamps.append(t-CURRENT_RESPONSE_TIME_PERCENTILE_WINDOW+i)