/** * Create an instance of {@link QuickStatData } * */ public QuickStatData createQuickStatData() { return new QuickStatData(); }
QuickStatData d = new QuickStatData(); Long x = periods.get(k) / (60 * 1000); d.setTimeInMinutes(BigInteger.valueOf(x)); d.setAvailabilityPercentage(rs.getDouble("avail")); d.setFailureCount(rs.getLong("failure")); d.setSuccessCount(rs.getLong("success")); d.setSLAViolationCount(rs.getLong("sla")); if (d.getSLAViolationCount() < 0) { d.setSLAViolationCount(0); d.setAverageResponseTime(rs.getLong("avgres")); d.setMTBF(df.newDuration(rs.getLong("mtbf"))); d.setMaximumRequestSize(rs.getLong("maxreq")); d.setMaximumResponseSize(rs.getLong("maxres")); d.setMaximumResponseTime(rs.getLong("maxresponsetime")); GregorianCalendar gcal = new GregorianCalendar(); gcal.setTimeInMillis(rs.getLong("timestampepoch")); d.setUpdatedAt((gcal)); d.setAverageCPUUsage(rs.getDouble("avgcpu")); d.setAverageMemoryUsage(rs.getLong("avgmem")); d.setAverageThreadCount(rs.getLong("avgthread")); d.setAverageOpenFileCount(rs.getLong("avgfile")); d.setAverageMessagesIn(rs.getLong("avgmsgin")); d.setAverageMessagesOut(rs.getLong("avgmsgout")); d.setAverageMessagesDropped(rs.getLong("avgmsgdropped")); d.setLargestQueueDepth(rs.getLong("maxqueuedepth")); w.getQuickStatData().add(d);
String val = (new Long(localdata.getSuccessCount()).toString()); if (Utility.stringIsNullOrEmpty(val)) { val = (NaN); String val = (new Long(localdata.getFailureCount()).toString()); if (Utility.stringIsNullOrEmpty(val)) { val = (NaN); if (localdata.getMTBF() != null) { val = (Utility.durationToString(localdata.getMTBF())); } else { val = (NaN); String val = (new Long(localdata.getSLAViolationCount()).toString()); if (Utility.stringIsNullOrEmpty(val)) { val = (NaN); String val = (new Long(localdata.getAverageResponseTime()).toString()); if (Utility.stringIsNullOrEmpty(val)) { val = NaN; String val = (new Long(localdata.getAverageResponseTime()).toString()); if (Utility.stringIsNullOrEmpty(val)) { val = NaN; String val = (new Long(localdata.getMaximumRequestSize()).toString()); if (Utility.stringIsNullOrEmpty(val)) { val = NaN;
/** * returns null if no records are found (meaning no aggregated stats are * available yet) * * @param data * @param timeInMs * @return */ private QuickStatData getRecord(QuickStatWrapper data, long timeInMs) { if (data == null) { return null; } for (int i = 0; i < data.getQuickStatData().size(); i++) { if ((data.getQuickStatData().get(i).getTimeInMinutes().longValue() * 60 * 1000) == timeInMs) { return data.getQuickStatData().get(i); } } return null; }