Add new metrics
This commit is contained in:
parent
36d7d917a7
commit
d5d8b0dcab
2 changed files with 5 additions and 3 deletions
|
@ -393,6 +393,8 @@ const storeMessage = function (Env, channel, msg, isCp, optionalMessageHash, tim
|
||||||
var msgLength = msgBin.length;
|
var msgLength = msgBin.length;
|
||||||
index.size += msgLength;
|
index.size += msgLength;
|
||||||
|
|
||||||
|
Monitoring.increment('broadcastMessage', (channel.length-1));
|
||||||
|
|
||||||
// handle the next element in the queue
|
// handle the next element in the queue
|
||||||
next();
|
next();
|
||||||
|
|
||||||
|
|
|
@ -41,9 +41,9 @@ const remove = (Env, pid) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const increment = (key) => {
|
const increment = (key, value) => {
|
||||||
calls[key] = calls[key] || 0;
|
if (typeof(value) !== "number") { value = 1; }
|
||||||
calls[key]++;
|
calls[key] = (calls[key] || 0) + value;
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
Loading…
Reference in a new issue