Skip to content

Commit

Permalink
Adding timestamps for the gino query
Browse files Browse the repository at this point in the history
  • Loading branch information
nss10 committed Sep 26, 2024
1 parent 13263f5 commit 5d9db6b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/mds/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,14 @@ def add_filter(query):
return query

if data:
return {
metadata.guid: metadata.data
for metadata in await add_filter(Metadata.query).gino.all()
}
import time

logging.info(
f" Current time stamp -- time.time() at the beginning of the gino call"
)
metadata_list = await add_filter(Metadata.query).gino.all()
logging.info(f" Current time stamp -- time.time() at the end of the gino call")
return {metadata.guid: metadata.data for metadata in metadata_list}
else:
return [
row[0]
Expand Down

0 comments on commit 5d9db6b

Please sign in to comment.