mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-24 09:01:51 +00:00
Revert "Revert "Merge pull request #24 from sharelatex/bg-add-profile""
This reverts commit a58cd0d787b51634caf694f9d858e638d27178b2.
This commit is contained in:
parent
8bd3dcca75
commit
0130d3513d
2 changed files with 11 additions and 1 deletions
|
@ -75,6 +75,15 @@ app.get "/check_lock", HttpController.checkLock
|
|||
|
||||
app.get "/health_check", HttpController.healthCheck
|
||||
|
||||
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, req: req, "an internal error occured"
|
||||
res.send 500
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
"mongo-uri": "^0.1.2",
|
||||
"s3-streams": "^0.3.0",
|
||||
"JSONStream": "^1.0.4",
|
||||
"heap": "^0.2.6"
|
||||
"heap": "^0.2.6",
|
||||
"v8-profiler": "^5.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chai": "~1.9.0",
|
||||
|
|
Loading…
Reference in a new issue