mirror of
https://github.com/amark/gun.git
synced 2025-06-07 14:46:44 +00:00
only flamegraph emails
This commit is contained in:
parent
a5a0eab24c
commit
827197dbb7
2
gun.js
2
gun.js
@ -2011,7 +2011,7 @@
|
|||||||
}
|
}
|
||||||
var S, ST; LOG && (S = +new Date); console.STAT = {};
|
var S, ST; LOG && (S = +new Date); console.STAT = {};
|
||||||
root.on('in', msg);
|
root.on('in', msg);
|
||||||
if(LOG && !msg.nts && (ST = +new Date - S) > 9){ opt.log(S, ST, 'msg', msg['#'], JSON.stringify(console.STAT)); if(ST > 500){ try{ require('./lib/email').send({text: ""+ST+"ms "+JSON.stringify(msg)+" | "+JSON.stringify(console.STAT), from: "mark@gun.eco", to: "mark@gun.eco", subject: "GUN MSG"}, noop); }catch(e){} } } // this is ONLY turned on if ENV CONFIGS have email/password to send out from.
|
if(LOG && !msg.nts && (ST = +new Date - S) > 9){ opt.log(S, ST, 'msg', msg['#'], JSON.stringify(console.STAT)) }
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -228,7 +228,6 @@
|
|||||||
//opt.store.put(tmp, f.text, cb); // revert to this after stats done below:
|
//opt.store.put(tmp, f.text, cb); // revert to this after stats done below:
|
||||||
opt.store.put(tmp, f.text, function(err,ok){
|
opt.store.put(tmp, f.text, function(err,ok){
|
||||||
LOG && opt.log(S, ST = +new Date - S, "wrote disk", tmp);
|
LOG && opt.log(S, ST = +new Date - S, "wrote disk", tmp);
|
||||||
LOG && (ST > 500) && require('./email').send({text: ""+ST+"ms "+tmp, from: "mark@gun.eco", to: "mark@gun.eco", subject: "RAD DISK WROTE"}, noop); // this is ONLY turned on if ENV CONFIGS have email/password to send out from.
|
|
||||||
cb(err,ok);
|
cb(err,ok);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -438,7 +437,6 @@
|
|||||||
p.disk.$ = json;
|
p.disk.$ = json;
|
||||||
LOG && (ST = +new Date - S) > 9 && opt.log(S, ST, 'rad parsed JSON');
|
LOG && (ST = +new Date - S) > 9 && opt.log(S, ST, 'rad parsed JSON');
|
||||||
map(q, p.ack);
|
map(q, p.ack);
|
||||||
LOG && (ST > 500) && require('./email').send({text: ""+ST+"ms "+ename(file), from: "mark@gun.eco", to: "mark@gun.eco", subject: "RAD JSON parse"}, noop); // this is ONLY turned on if ENV CONFIGS have email/password to send out from.
|
|
||||||
return;
|
return;
|
||||||
}catch(e){ tmp = e }
|
}catch(e){ tmp = e }
|
||||||
if('{' === data[0]){
|
if('{' === data[0]){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user