From 520dc2ff7b8f512c684499fd16a929700c2faa7b Mon Sep 17 00:00:00 2001 From: David Nuon Date: Tue, 9 Jan 2024 12:37:16 -0800 Subject: [PATCH] fix: Fix event logging to log proper start and end time --- edxsearch/__init__.py | 2 +- search/api.py | 8 ++++---- search/tests/test_api_timing_events.py | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/edxsearch/__init__.py b/edxsearch/__init__.py index 9f65a02f..4807b08e 100644 --- a/edxsearch/__init__.py +++ b/edxsearch/__init__.py @@ -1,3 +1,3 @@ """ Container module for testing / demoing search """ -__version__ = '3.8.1' +__version__ = '3.8.2' diff --git a/search/api.py b/search/api.py index fde7010d..43d2ed18 100644 --- a/search/api.py +++ b/search/api.py @@ -110,13 +110,13 @@ def emit_api_timing_event(search_term, course_id, filter_generation_timer, proce "elapsed": filter_generation_timer.elapsed_time, }, "processing_time": { - "start": processing_timer.start_time_string, - "end": processing_timer.start_time_string, + "start": processing_timer.start_time, + "end": processing_timer.end_time, "elapsed": processing_timer.elapsed_time, }, "search_time": { - "start": search_timer.start_time_string, - "end": search_timer.start_time_string, + "start": search_timer.start_time, + "end": search_timer.end_time, "elapsed": search_timer.elapsed_time, }, }) diff --git a/search/tests/test_api_timing_events.py b/search/tests/test_api_timing_events.py index 1c11347e..dcf83c3e 100644 --- a/search/tests/test_api_timing_events.py +++ b/search/tests/test_api_timing_events.py @@ -52,13 +52,13 @@ def test_perform_search(self): "elapsed": filter_generation_timer.elapsed_time, }, "processing_time": { - "start": processing_timer.start_time_string, - "end": processing_timer.start_time_string, + "start": processing_timer.start_time, + "end": processing_timer.end_time, "elapsed": processing_timer.elapsed_time, }, "search_time": { - "start": search_timer.start_time_string, - "end": search_timer.start_time_string, + "start": search_timer.start_time, + "end": search_timer.end_time, "elapsed": search_timer.elapsed_time, }, })