|
|
@@ -106,6 +106,15 @@ app.use (req, res, next) ->
|
|
|
app.get "/status", (req, res)->
|
|
|
res.send("web sharelatex is alive")
|
|
|
req.session.destroy()
|
|
|
+
|
|
|
+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
|
|
|
|
|
|
logger.info ("creating HTTP server").yellow
|
|
|
server = require('http').createServer(app)
|