added flame graph

This commit is contained in:
Henry Oswald 2015-03-02 15:48:27 +00:00
parent 57d214e2dd
commit 86416775fc
2 changed files with 10 additions and 1 deletions

View file

@ -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

View file

@ -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",