public double getAvg() { if (monData.enabled) return avg(monData.total); else return 0; }
public double getAvg() { if (monData.enabled) return avg(monData.total); else return 0; }
public double getAvgActive() { if (monData.enabled) { /* can be two ways to get active. For ranges thisActiveTotal is used and for nonranges totalActive is used. * This is because the ranges show how many of that range are active (thisActiveTotal) and totalActive * shows how many are active for the entire monitor */ if (monData.trackActivity) { return avg(monData.thisActiveTotal); } else return avg(monData.totalActive); } else return 0; }
public double getAvgGlobalActive() { return avg(monData.allActiveTotal); }
/** Used due to the fact when activity tracking is turned on it goes through the jamon web filter and does a start, * then turns on activity tracking and in stop performs a decrement (even though no increment was done in start) * this results in potential negative values. Note this can't happen with the activity measure for this object as it * is always enabled. it can only happen for primary and global active. note bigger numbers are also slightly off * however the values won't be negative and will be consistently off by less than 1. * * @param value * @return average */ private double avgNoNeg(double value) { double v=avg(value); return (v<=0) ? 0 : v; }
public double getAvgPrimaryActive() { return avg(monData.primaryActiveTotal); }