Skip to content

Commit 502597c

Browse files
committed
Format duration
1 parent 2774507 commit 502597c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/execution/middleware.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ logs the time it takes to resolve each field
5656
start = timer()
5757
return_value = next(root, info, **args)
5858
duration = timer() - start
59-
logger.debug("{parent_type}.{field_name}: {duration}".format(
59+
logger.debug("{parent_type}.{field_name}: {duration} ms".format(
6060
parent_type=root._meta.name if root else '',
6161
field_name=info.field_name,
62-
duration=duration
62+
duration=round(duration * 1000, 2)
6363
))
6464
return return_value
6565

0 commit comments

Comments
 (0)