/** * Gets the active average * * @return average active * * @see com.jamonapi.Monitor#getAvgActive() */ public double getAvgActive() { return monitor.getAvgActive(); }
/** * Gets the active average. * * @return average active * @see com.jamonapi.Monitor#getAvgActive() */ @Override public double getAvgActive() { return monitor.getAvgActive(); }
/** This returns a weighted average */ public double getAvgActive() { double weightedActive=0; double totalHits=0; for (int i=0;i<numRows;i++) { double hits=monitors[i].getHits(); weightedActive=hits*monitors[i].getAvgActive(); totalHits+=hits; } if (totalHits==0) return 0; else return weightedActive/totalHits; }
/** This returns a weighted average */ @Override public double getAvgActive() { double weightedActive=0; double totalHits=0; for (int i=0;i<numRows;i++) { double hits=monitors[i].getHits(); weightedActive=hits*monitors[i].getAvgActive(); totalHits+=hits; } if (totalHits==0) return 0; else return weightedActive/totalHits; }
b.append(getActive()); b.append(", Avg Active="); b.append(getAvgActive()); b.append(", Max Active="); b.append(getMaxActive());
b.append(getActive()); b.append(", Avg Active="); b.append(getAvgActive()); b.append(", Max Active="); b.append(getMaxActive());
return getFirstAccess(); else if (AVGACTIVE.equalsIgnoreCase(key)) return new Double(getAvgActive()); else if (MAXACTIVE.equalsIgnoreCase(key)) return new Double(getMaxActive());
/** * @see patterntesting.runtime.monitor.ProfileMonitor#toCsvString() */ public String toCsvString() { return monitor.getLabel() + "; " + monitor.getUnits() + "; " + monitor.getLastValue() + "; " + (long) monitor.getHits() + "; " + monitor.getAvg() + "; " + monitor.getTotal() + "; " + monitor.getMin() + "; " + monitor.getMax() + "; " + monitor.getActive() + "; " + monitor.getAvgActive() + "; " + monitor.getMaxActive() + "; " + monitor.getFirstAccess() + "; " + monitor.getLastAccess() + ";"; }
/** * To csv string. * * @return the string * @see patterntesting.runtime.monitor.ProfileMonitor#toCsvString() */ @Override public String toCsvString() { return '"' + monitor.getLabel() + "\"; " + monitor.getUnits() + "; " + monitor.getLastValue() + "; " + (long) monitor.getHits() + "; " + monitor.getAvg() + "; " + monitor.getTotal() + "; " + monitor.getMin() + "; " + monitor.getMax() + "; " + monitor.getActive() + "; " + monitor.getAvgActive() + "; " + monitor.getMaxActive() + "; " + monitor.getFirstAccess() + "; " + monitor.getLastAccess() + ";"; }
public MonitorDelta(Monitor mon) { label = mon.getLabel(); units = mon.getUnits(); hits = mon.getHits(); total = mon.getTotal(); avg = mon.getAvg(); min = mon.getMin(); max = mon.getMax(); stdDev = mon.getStdDev(); firstAccess = mon.getFirstAccess(); lastAccess = mon.getLastAccess(); lastValue = mon.getLastValue(); active = mon.getActive(); maxActive = mon.getMaxActive(); avgActive = mon.getAvgActive(); }