-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
let reqsec = tx2.meter(
{
name : 'request',
samples : 1,
timeframe : 60,
unit : "req/sec"
})There is a bug when using the unit property of the meter object.
In the pm2 dashboard, it will be displayed twice, like this:
request 0 req/sec req/sec
To fix the bug, just delete ' + '' + opts.unit' on line 196 of the tx2/src/metrics.js file
That is, instead of this:
this._metrics[opts.name] = {
value: function() {
return meter.val() + '' + opts.unit
},
unit : opts.unit
}You should have this:
this._metrics[opts.name] = {
value: function() {
return meter.val()
},
unit : opts.unit
}Metadata
Metadata
Assignees
Labels
No labels