Do not duplicate timer

remotes/origin/dgaubert/ch78384/maps-api-replace-log4js-logger-by-pino
Daniel García Aubert 4 years ago
parent 649f8d701e
commit f6c8796c8a

@ -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 {

Loading…
Cancel
Save