mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Added memwatch for memory leak detection (#10166)
This commit is contained in:
committed by
Sabe Jones
parent
bde8b76da7
commit
25b9e6f330
12
package-lock.json
generated
12
package-lock.json
generated
@@ -2020,8 +2020,7 @@
|
||||
"bindings": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz",
|
||||
"integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw==",
|
||||
"optional": true
|
||||
"integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw=="
|
||||
},
|
||||
"bitsyntax": {
|
||||
"version": "0.0.4",
|
||||
@@ -13335,6 +13334,15 @@
|
||||
"readable-stream": "2.3.4"
|
||||
}
|
||||
},
|
||||
"memwatch-next": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/memwatch-next/-/memwatch-next-0.3.0.tgz",
|
||||
"integrity": "sha1-IREFD5qQbgqi1ypOwPAInHhyb48=",
|
||||
"requires": {
|
||||
"bindings": "1.3.0",
|
||||
"nan": "2.6.2"
|
||||
}
|
||||
},
|
||||
"meow": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"jquery": ">=3.0.0",
|
||||
"js2xmlparser": "^3.0.0",
|
||||
"lodash": "^4.17.4",
|
||||
"memwatch-next": "^0.3.0",
|
||||
"merge-stream": "^1.0.0",
|
||||
"method-override": "^2.3.5",
|
||||
"moment": "^2.21.0",
|
||||
|
||||
@@ -4,6 +4,14 @@ import express from 'express';
|
||||
import http from 'http';
|
||||
import Bluebird from 'bluebird';
|
||||
|
||||
// @TODO: May need to remove - testing
|
||||
import memwatch from 'memwatch-next';
|
||||
|
||||
memwatch.on('leak', (info) => {
|
||||
const message = `Memory leak detected:\n${info}`;
|
||||
logger.error(message);
|
||||
});
|
||||
|
||||
global.Promise = Bluebird;
|
||||
|
||||
const server = http.createServer();
|
||||
|
||||
Reference in New Issue
Block a user