From 502597c5a4db303890c9d1729a83dd928ae1a78c Mon Sep 17 00:00:00 2001 From: Jonathan Kim Date: Fri, 8 Dec 2017 15:03:20 +0000 Subject: [PATCH] Format duration --- docs/execution/middleware.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/execution/middleware.rst b/docs/execution/middleware.rst index 01180c07..203cd881 100644 --- a/docs/execution/middleware.rst +++ b/docs/execution/middleware.rst @@ -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