mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-02 12:44:15 +03:00
Format duration
This commit is contained in:
parent
27745078bc
commit
502597c5a4
|
@ -56,10 +56,10 @@ logs the time it takes to resolve each field
|
|||
start = timer()
|
||||
return_value = next(root, info, **args)
|
||||
duration = timer() - start
|
||||
logger.debug("{parent_type}.{field_name}: {duration}".format(
|
||||
logger.debug("{parent_type}.{field_name}: {duration} ms".format(
|
||||
parent_type=root._meta.name if root else '',
|
||||
field_name=info.field_name,
|
||||
duration=duration
|
||||
duration=round(duration * 1000, 2)
|
||||
))
|
||||
return return_value
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user