mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-01 07:44:37 +00:00
Merge pull request #29 from overleaf/em-fix-timing-metrics
Fix HTTP request timing metrics
This commit is contained in:
commit
8ab79dd1ce
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ module.exports.monitor = (logger) ->
|
||||||
res.end = () ->
|
res.end = () ->
|
||||||
end.apply(this, arguments)
|
end.apply(this, arguments)
|
||||||
responseTime = process.hrtime(startTime)
|
responseTime = process.hrtime(startTime)
|
||||||
responseTimeMs = Math.round(responseTime[0] * 1000 + responseTime[1] / 1000)
|
responseTimeMs = Math.round(responseTime[0] * 1000 + responseTime[1] / 1000000)
|
||||||
requestSize = parseInt(req.headers["content-length"], 10)
|
requestSize = parseInt(req.headers["content-length"], 10)
|
||||||
if req.route?.path?
|
if req.route?.path?
|
||||||
routePath = req.route.path.toString().replace(/\//g, '_').replace(/\:/g, '').slice(1)
|
routePath = req.route.path.toString().replace(/\//g, '_').replace(/\:/g, '').slice(1)
|
||||||
|
|
Loading…
Reference in a new issue