mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
instructions on running node-webkit-agent for debugging memory leaks
This commit is contained in:
@@ -24,7 +24,8 @@
|
|||||||
"nconf": "*",
|
"nconf": "*",
|
||||||
"icalendar": "git://github.com/lefnire/node-icalendar#master",
|
"icalendar": "git://github.com/lefnire/node-icalendar#master",
|
||||||
"resolve": "~0.2.3",
|
"resolve": "~0.2.3",
|
||||||
"browserify": "1.17.3"
|
"browserify": "1.17.3",
|
||||||
|
"webkit-devtools-agent": "*"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"subdomain": "habitrpg",
|
"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_API_KEY = conf.get("STRIPE_API_KEY");
|
||||||
process.env.STRIPE_PUB_KEY = conf.get("STRIPE_PUB_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) {
|
process.on('uncaughtException', function (error) {
|
||||||
|
|
||||||
function sendEmail(mailData) {
|
function sendEmail(mailData) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ url = helpers.playUrl
|
|||||||
|
|
||||||
casper.start url
|
casper.start url
|
||||||
|
|
||||||
casper.repeat 50, ->
|
casper.repeat 100, ->
|
||||||
casper.reload()
|
casper.reload()
|
||||||
|
|
||||||
casper.run ->
|
casper.run ->
|
||||||
|
|||||||
Reference in New Issue
Block a user