Add request duration in milliseconds
This commit is contained in:
parent
b7ecea3201
commit
df604adc2a
@ -19,7 +19,7 @@ module.exports = function profiler ({ statsClient, logOnEvent = 'finish' }) {
|
|||||||
req.profiler.add({ response: new Date() - start });
|
req.profiler.add({ response: new Date() - start });
|
||||||
req.profiler.end();
|
req.profiler.end();
|
||||||
const stats = req.profiler.toJSON();
|
const stats = req.profiler.toJSON();
|
||||||
logger.info({ stats, duration: stats.response / 1000 }, 'Request profiling stats');
|
logger.info({ stats, duration: stats.response / 1000, duration_ms: stats.response }, 'Request profiling stats');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
req.profiler.sendStats();
|
req.profiler.sendStats();
|
||||||
|
Loading…
Reference in New Issue
Block a user