mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-29 12:41:40 +00:00
Merge branch 'master' of github.com:sharelatex/clsi-sharelatex
This commit is contained in:
commit
d7e53941b6
2 changed files with 11 additions and 1 deletions
|
@ -86,6 +86,15 @@ app.get "/health_check", (req, res)->
|
|||
res.contentType(resCacher?.setContentType)
|
||||
res.send resCacher?.code, resCacher?.body
|
||||
|
||||
profiler = require "v8-profiler"
|
||||
app.get "/profile", (req, res) ->
|
||||
time = parseInt(req.query.time || "1000")
|
||||
profiler.startProfiling("test")
|
||||
setTimeout () ->
|
||||
profile = profiler.stopProfiling("test")
|
||||
res.json(profile)
|
||||
, time
|
||||
|
||||
app.use (error, req, res, next) ->
|
||||
logger.error err: error, "server error"
|
||||
res.send error?.statusCode || 500
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
"express": "^4.2.0",
|
||||
"body-parser": "^1.2.0",
|
||||
"fs-extra": "^0.16.3",
|
||||
"underscore": "^1.8.2"
|
||||
"underscore": "^1.8.2",
|
||||
"v8-profiler": "^5.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "1.10.0",
|
||||
|
|
Loading…
Reference in a new issue