mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
added flame graph
This commit is contained in:
parent
57d214e2dd
commit
86416775fc
2 changed files with 10 additions and 1 deletions
|
@ -24,6 +24,14 @@ server.get "/status", (req, res)->
|
|||
|
||||
server.get "/health_check", HealthCheckController.healthCheck
|
||||
|
||||
profiler = require "v8-profiler"
|
||||
server.get "/profile", (req, res) ->
|
||||
time = parseInt(req.query.time || "1000")
|
||||
profiler.startProfiling("test")
|
||||
setTimeout () ->
|
||||
profile = profiler.stopProfiling("test")
|
||||
res.json(profile)
|
||||
, time
|
||||
|
||||
host = Settings.internal?.spelling?.host || "localhost"
|
||||
port = Settings.internal?.spelling?.port || 3005
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
"request": "^2.53.0",
|
||||
"restify": "2.5.1",
|
||||
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.0.0",
|
||||
"underscore": "1.4.4"
|
||||
"underscore": "1.4.4",
|
||||
"v8-profiler": "^5.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bunyan": "^1.0.0",
|
||||
|
|
Loading…
Reference in a new issue