From ef54186dbe6467584faff008995040e7f9374a85 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mon, 15 Feb 2021 14:42:15 +0100 Subject: [PATCH] Re-create the TestAPI object for each instance tested This ensure we have clean stats for each rather than keeping data from the previous run into the next one. Signed-off-by: Pierre-Yves Chibon --- scripts/test_datagrepper_perfs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/test_datagrepper_perfs.py b/scripts/test_datagrepper_perfs.py index fe4b206..2db3b62 100644 --- a/scripts/test_datagrepper_perfs.py +++ b/scripts/test_datagrepper_perfs.py @@ -335,10 +335,7 @@ def main(): test_time = 3600 # time in seconds, e.g. 36000 ramp_up = 0 # total time in secs to ramp up. default 0, no wait - perf_test = TestAPI() - workers = [] start_time = time.time() - perf_test.start_time = start_time print("Tests started at %s." % time.asctime()) for env_name, base_url in [ @@ -347,6 +344,9 @@ def main(): ("datagrepper-prod/aws", "http://datagrepper.arc.fedorainfracloud.org/datagrepper"), ("datagrepper-prod/openshift", "https://datagrepper-monitor-dashboard.app.os.fedoraproject.org"), ]: + perf_test = TestAPI() + perf_test.start_time = start_time + workers = [] for i in range(concurrent_users): thread = Thread(