From ea6afd1d0f7e975b8886514679f2ad50d5268e2a Mon Sep 17 00:00:00 2001 From: yanpz <justinz@yeah.net> Date: Sat, 4 Apr 2020 20:49:13 +0800 Subject: [PATCH] fix view time precise issue --- lib/grape_logging/middleware/request_logger.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/grape_logging/middleware/request_logger.rb b/lib/grape_logging/middleware/request_logger.rb index a401ab1..a579881 100644 --- a/lib/grape_logging/middleware/request_logger.rb +++ b/lib/grape_logging/middleware/request_logger.rb @@ -115,7 +115,7 @@ def total_runtime end def view_runtime - total_runtime - db_runtime + (total_runtime - db_runtime).round(2) end def db_runtime