Skip to content

Commit

Permalink
tweak: move all timings into single logging call
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-webber authored and MatMoore committed Aug 6, 2024
1 parent 80e0fea commit 212fedd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ingestion/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ def st_func(*args, **kwargs):
logging.info(
f"Function={func.__name__}, arg_types={arg_types}, kwargs={kwargs}, "
f"start_time={time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(t1))}, "
f"end_time={time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(t2))}"
f"end_time={time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(t2))}, "
f"elapsed_time={str(timedelta(seconds=elapsed))}"
)
logging.info(
f"Function={func.__name__}, arg_types={arg_types}, kwargs={kwargs}, elapsed_time={str(timedelta(seconds=elapsed))}"
f"Function={func.__name__}, arg_types={arg_types}, kwargs={kwargs}"
)
return r

Expand Down

0 comments on commit 212fedd

Please sign in to comment.