From 04871b0379b206d1fcd7d1e5949bf8aae78e89f4 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Wed, 30 Aug 2023 23:31:54 +0200 Subject: [PATCH] fix divis --- src/tasks.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tasks.py b/src/tasks.py index be7c4fb..b779276 100644 --- a/src/tasks.py +++ b/src/tasks.py @@ -458,12 +458,12 @@ def read_analytics_file(package_status_id, package_id, link, session): compute_times.append(compute_time_diff) print(f'Channel messages data: {time.time() - start}') - print(f'Average channel read time: {sum(read_channel_times) / len(read_channel_times)}') - print(f'Average CSV read time: {sum(read_csv_times) / len(read_csv_times)}') - print(f'Average JSON read time: {sum(read_json_times) / len(read_json_times)}') - print(f'Average compute time: {sum(compute_times) / len(compute_times)}') - print(f'Average compute 1 time: {sum(compute_1_times) / len(compute_1_times)}') - print(f'Average compute 2 time: {sum(compute_2_times) / len(compute_2_times)}') + print(f'Average channel read time: {sum(read_channel_times) / (len(read_channel_times) or 1)}') + print(f'Average CSV read time: {sum(read_csv_times) / (len(read_csv_times) or 1)}') + print(f'Average JSON read time: {sum(read_json_times) / (len(read_json_times) or 1)}') + print(f'Average compute time: {sum(compute_times) / (len(compute_times) or 1)}') + print(f'Average compute 1 time: {sum(compute_1_times) / (len(compute_1_times) or 1)}') + print(f'Average compute 2 time: {sum(compute_2_times) / (len(compute_2_times) or 1)}') ''' Process voice channel logs to get a list of "events"