mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-31 19:20:25 +00:00
instructions on running node-webkit-agent for debugging memory leaks
This commit is contained in:
parent
7c480124cf
commit
0a3fc9f715
3 changed files with 14 additions and 2 deletions
|
|
@ -24,7 +24,8 @@
|
|||
"nconf": "*",
|
||||
"icalendar": "git://github.com/lefnire/node-icalendar#master",
|
||||
"resolve": "~0.2.3",
|
||||
"browserify": "1.17.3"
|
||||
"browserify": "1.17.3",
|
||||
"webkit-devtools-agent": "*"
|
||||
},
|
||||
"private": true,
|
||||
"subdomain": "habitrpg",
|
||||
|
|
|
|||
11
server.js
11
server.js
|
|
@ -22,6 +22,17 @@ process.env.SMTP_SERVICE = conf.get("SMTP_SERVICE");
|
|||
process.env.STRIPE_API_KEY = conf.get("STRIPE_API_KEY");
|
||||
process.env.STRIPE_PUB_KEY = conf.get("STRIPE_PUB_KEY");
|
||||
|
||||
var agent;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// Follow these instructions for profiling / debugging leaks
|
||||
// * https://developers.google.com/chrome-developer-tools/docs/heap-profiling
|
||||
// * https://developers.google.com/chrome-developer-tools/docs/memory-analysis-101
|
||||
agent = require('webkit-devtools-agent');
|
||||
console.log("To debug memory leaks:" +
|
||||
"\n\t(1) Run `kill -SIGUSR2 " + process.pid + "`" +
|
||||
"\n\t(2) open http://c4milo.github.com/node-webkit-agent/21.0.1180.57/inspector.html?host=localhost:1337&page=0");
|
||||
}
|
||||
|
||||
process.on('uncaughtException', function (error) {
|
||||
|
||||
function sendEmail(mailData) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ url = helpers.playUrl
|
|||
|
||||
casper.start url
|
||||
|
||||
casper.repeat 50, ->
|
||||
casper.repeat 100, ->
|
||||
casper.reload()
|
||||
|
||||
casper.run ->
|
||||
|
|
|
|||
Loading…
Reference in a new issue