mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 15:38:59 +00:00
chore: Remove apdex check from new relic monitoring
This commit is contained in:
parent
74dace9b5a
commit
7e9163a17f
1 changed files with 1 additions and 2 deletions
|
|
@ -19,11 +19,10 @@ module.exports = function(server,mongoose) {
|
||||||
}, function(err, response, body){
|
}, function(err, response, body){
|
||||||
var ts = JSON.parse(body).metric_data.metrics[0].timeslices,
|
var ts = JSON.parse(body).metric_data.metrics[0].timeslices,
|
||||||
score = ts[ts.length-1].values.score,
|
score = ts[ts.length-1].values.score,
|
||||||
apdexBad = score < .75 || score == 1,
|
|
||||||
memory = os.freemem() / os.totalmem(),
|
memory = os.freemem() / os.totalmem(),
|
||||||
memoryHigh = memory < 0.1;
|
memoryHigh = memory < 0.1;
|
||||||
|
|
||||||
if (apdexBad || memoryHigh) {
|
if (memoryHigh) {
|
||||||
var newRelicMemoryLeakMessage = '[Memory Leak] Apdex='+score+' Memory='+parseFloat(memory).toFixed(3)+' Time='+moment().format();
|
var newRelicMemoryLeakMessage = '[Memory Leak] Apdex='+score+' Memory='+parseFloat(memory).toFixed(3)+' Time='+moment().format();
|
||||||
throw newRelicMemoryLeakMessage;
|
throw newRelicMemoryLeakMessage;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue