Skip to content

Commit

Permalink
fix: import error
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-webber committed Jul 23, 2024
1 parent 912ef6f commit 065b81e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ingestion/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from time import strftime, time
import time


def st_time(func):
Expand All @@ -8,13 +8,13 @@ def st_time(func):
"""

def st_func(*args, **keyArgs):
t1 = time()
t1 = time.time()
r = func(*args, **keyArgs)
t2 = time()
t2 = time.time()
logging.info(
f"Function={func.__name__}, args={args}, "
f"start_time={strftime('%Y-%m-%d %H:%M:%S', time.gmtime(t1))}, "
f"end_time={strftime('%Y-%m-%d %H:%M:%S', time.gmtime(t2))}"
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))}"
)
logging.info(f"Function={func.__name__}, args={args}, total_time={t2 - t1}")
return r
Expand Down

0 comments on commit 065b81e

Please sign in to comment.