From 7b11c0d8536e2719a325120d2d3603e27ccc8289 Mon Sep 17 00:00:00 2001 From: TeachMeTW Date: Sat, 2 Nov 2024 20:45:30 -0700 Subject: [PATCH] added instrumentation to the _get_and_store_range --- emission/pipeline/intake_stage.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/emission/pipeline/intake_stage.py b/emission/pipeline/intake_stage.py index a93ba2996..b681f93d5 100644 --- a/emission/pipeline/intake_stage.py +++ b/emission/pipeline/intake_stage.py @@ -198,7 +198,13 @@ def run_intake_pipeline_for_user(uuid, skip_if_no_new_data): esds.store_pipeline_time(uuid, ecwp.PipelineStages.CREATE_COMPOSITE_OBJECTS.name, time.time(), crt.elapsed) - _get_and_store_range(uuid, "analysis/composite_trip") + with ect.Timer() as gsr: + logging.info("*" * 10 + "UUID %s: generating store and range " % uuid + "*" * 10) + print(str(arrow.now()) + "*" * 10 + "UUID %s: generating store and range " % uuid + "*" * 10) + _get_and_store_range(uuid, "analysis/composite_trip") + + esds.store_pipeline_time(uuid, 'GENERATE_STORE_AND_RANGE', + time.time(), gsr.elapsed) def _get_and_store_range(user_id, trip_key): ts = esta.TimeSeries.get_time_series(user_id)