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;
|
||||
index.size += msgLength;
|
||||
|
||||
Monitoring.increment('broadcastMessage', (channel.length-1));
|
||||
|
||||
// handle the next element in the queue
|
||||
next();
|
||||
|
||||
|
|
|
@ -41,9 +41,9 @@ const remove = (Env, pid) => {
|
|||
}
|
||||
};
|
||||
|
||||
const increment = (key) => {
|
||||
calls[key] = calls[key] || 0;
|
||||
calls[key]++;
|
||||
const increment = (key, value) => {
|
||||
if (typeof(value) !== "number") { value = 1; }
|
||||
calls[key] = (calls[key] || 0) + value;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
|
|
Loading…
Reference in a new issue