From f6c8796c8a158d6b04204af2cb55acb3beb42a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Thu, 11 Jun 2020 10:12:27 +0200 Subject: [PATCH] Do not duplicate timer --- lib/api/middlewares/profiler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/api/middlewares/profiler.js b/lib/api/middlewares/profiler.js index c505a77d..9d2b573b 100644 --- a/lib/api/middlewares/profiler.js +++ b/lib/api/middlewares/profiler.js @@ -16,10 +16,10 @@ module.exports = function profiler (options) { profile: enabled }); - req.profiler.start(prefix); + req.profiler.start([prefix, 'response'].join('.')); res.on('finish', () => { - req.profiler.done('response'); + req.profiler.end(); logger.info({ stats: req.profiler.toJSON() }); try {