Add units to more stats
This commit is contained in:
@ -156,13 +156,15 @@ public class PromManager implements ClientApp {
|
|||||||
.labelNames("state");
|
.labelNames("state");
|
||||||
// heuristics
|
// heuristics
|
||||||
String nlc = name.toLowerCase(Locale.US);
|
String nlc = name.toLowerCase(Locale.US);
|
||||||
if (nlc.contains("time") || nlc.contains("delay") || nlc.contains("lag")) {
|
if (nlc.contains("time") || nlc.contains("delay") || nlc.contains("lag") ||
|
||||||
|
nlc.contains("_skew_")) {
|
||||||
// All our stats are in ms
|
// All our stats are in ms
|
||||||
gwcb.unit(Unit.SECONDS)
|
gwcb.unit(Unit.SECONDS)
|
||||||
.callback(callback -> {
|
.callback(callback -> {
|
||||||
callback.call(rate.getAvgOrLifetimeAvg() / 1000, "average");
|
callback.call(rate.getAvgOrLifetimeAvg() / 1000, "average");
|
||||||
});
|
});
|
||||||
} else if (nlc.contains("size") || nlc.contains("memory") ||
|
} else if (nlc.contains("size") || nlc.contains("memory") ||
|
||||||
|
nlc.contains("sendrate") || nlc.contains("recvrate") ||
|
||||||
nlc.contains("bps") || nlc.contains("bandwidth")) {
|
nlc.contains("bps") || nlc.contains("bandwidth")) {
|
||||||
gwcb.unit(Unit.BYTES)
|
gwcb.unit(Unit.BYTES)
|
||||||
.callback(callback -> {
|
.callback(callback -> {
|
||||||
|
Reference in New Issue
Block a user