From 329f6524057ff9d48e4b39f3f60e6c129a9daaf3 Mon Sep 17 00:00:00 2001 From: Brian Mesick Date: Mon, 25 Mar 2024 11:44:39 -0400 Subject: [PATCH] feat: Store load test run Allows the monitor to wait until the run starts and share the run id with the load test script. --- .../management/commands/load_test_tracking_events.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform_plugin_aspects/management/commands/load_test_tracking_events.py b/platform_plugin_aspects/management/commands/load_test_tracking_events.py index dcb6edb..e243291 100644 --- a/platform_plugin_aspects/management/commands/load_test_tracking_events.py +++ b/platform_plugin_aspects/management/commands/load_test_tracking_events.py @@ -120,6 +120,10 @@ def record_start(self) -> None: "username_prefix": self.username_prefix, }) + # Let the monitoring script connect, otherwise we can finish the test before it even + # knows we've started. + sleep(5) + def record_end(self) -> None: self.record_to_clickhouse("end", { "sent_event_count": self.sent_event_count