From 9954a0b9975d57b2dbab6c3a0ab51e5d23240283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Tue, 20 Feb 2024 15:59:41 +0100 Subject: [PATCH] added time debug for publishing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- server/app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/app.py b/server/app.py index a861243..4c6f587 100644 --- a/server/app.py +++ b/server/app.py @@ -135,6 +135,7 @@ def mqtt_publisher(ti_receiver): tube_index = json.loads(tube_index) end = time.time() print("Converting tube index back to list wtih leval took: "+str(end-start)) + start = time.time() for index_row in tube_index: if artNetPacket.universe == int(index_row[1]): dmx_address = int(index_row[2]) @@ -149,7 +150,8 @@ def mqtt_publisher(ti_receiver): result_str = [str(color) for color in colors] result = str(result_str) mqtt_client.publish(p1_topic, result) - + end = time.time() + print("Sending out to all tubes took: "+str(end-start)) except KeyboardInterrupt: artNet.close() def tube_index_updater(ti_queue):