/** * @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet) */ @Override public ResponseStatsHistogramBean handle(ResultSet rs) throws SQLException { while (rs.next()) { long time = rs.getLong(1); String rtype = rs.getString(2); long count = rs.getLong(3); ResponseStatsDataPoint dataPoint = index.get(time); if (dataPoint != null) { if (rtype == null) { dataPoint.setTotal(dataPoint.getErrors() + dataPoint.getFailures() + count); } else if (rtype.equals("failure")) { //$NON-NLS-1$ dataPoint.setTotal(dataPoint.getTotal() + count); dataPoint.setFailures(count); } else if (rtype.equals("error")) { //$NON-NLS-1$ dataPoint.setTotal(dataPoint.getTotal() + count); dataPoint.setErrors(count); } } } return histogram; }
/** * @param app * @param total * @param failures * @param errors */ public void addDataPoint(String app, long total, long failures, long errors) { ResponseStatsDataPoint point = new ResponseStatsDataPoint(null, total, failures, errors); data.put(app, point); }
/** * @see java.lang.Object#toString() */ @SuppressWarnings("nls") @Override public String toString() { return getLabel() + "[t:" + getTotal() + " f:" + getFailures() + " e:" + getErrors() + "]"; }
/** * Constructor. * @param label * @param total * @param failures * @param errors */ public ResponseStatsDataPoint(String label, long total, long failures, long errors) { super(label); setTotal(total); setFailures(failures); setErrors(errors); }
for (Entry<String, BucketDataPointBean> entry : totalData.entrySet()) { String key = entry.getKey().substring("clientId".length()); //$NON-NLS-1$ ResponseStatsDataPoint dp = new ResponseStatsDataPoint(); dp.setLabel(key); dp.setTotal(entry.getValue().getSamples()); topTen.put(key, dp); ResponseStatsDataPoint dp = topTen.get(key); if (dp != null) { dp.setFailures(entry.getValue().getSamples()); ResponseStatsDataPoint dp = topTen.get(key); if (dp != null) { dp.setErrors(entry.getValue().getSamples());
/** * Constructor. * @param label * @param total * @param failures * @param errors */ public ResponseStatsDataPoint(String label, long total, long failures, long errors) { super(label); setTotal(total); setFailures(failures); setErrors(errors); }
for (Entry<String, BucketDataPointBean> entry : totalData.entrySet()) { String key = entry.getKey().substring("planId".length()); //$NON-NLS-1$ ResponseStatsDataPoint dp = new ResponseStatsDataPoint(); dp.setLabel(key); dp.setTotal(entry.getValue().getSamples()); topTen.put(key, dp); ResponseStatsDataPoint dp = topTen.get(key); if (dp != null) { dp.setFailures(entry.getValue().getSamples()); ResponseStatsDataPoint dp = topTen.get(key); if (dp != null) { dp.setErrors(entry.getValue().getSamples());
/** * @see java.lang.Object#toString() */ @SuppressWarnings("nls") @Override public String toString() { return getLabel() + "[t:" + getTotal() + " f:" + getFailures() + " e:" + getErrors() + "]"; }
dataPoint = new ResponseStatsDataPoint(); rval.getData().put(plan, dataPoint); dataPoint.setTotal(dataPoint.getErrors() + dataPoint.getFailures() + count); } else if (rtype.equals("failure")) { //$NON-NLS-1$ dataPoint.setTotal(dataPoint.getTotal() + count); dataPoint.setFailures(count); } else if (rtype.equals("error")) { //$NON-NLS-1$ dataPoint.setTotal(dataPoint.getTotal() + count); dataPoint.setErrors(count);
long errors = totalErrorsAgg.getCount(); ResponseStatsDataPoint point = index.get(keyAsString); point.setTotal(entry.getCount()); point.setFailures(failures); point.setErrors(errors);
/** * @param plan * @param total * @param failures * @param errors */ public void addDataPoint(String plan, long total, long failures, long errors) { ResponseStatsDataPoint point = new ResponseStatsDataPoint(null, total, failures, errors); data.put(plan, point); }
dataPoint = new ResponseStatsDataPoint(); rval.getData().put(client, dataPoint); dataPoint.setTotal(dataPoint.getErrors() + dataPoint.getFailures() + count); } else if (rtype.equals("failure")) { //$NON-NLS-1$ dataPoint.setTotal(dataPoint.getTotal() + count); dataPoint.setFailures(count); } else if (rtype.equals("error")) { //$NON-NLS-1$ dataPoint.setTotal(dataPoint.getTotal() + count); dataPoint.setErrors(count);
long errors = totalErrorsAgg.getCount(); ResponseStatsDataPoint point = index.get(keyAsString); point.setTotal(entry.getCount()); point.setFailures(failures); point.setErrors(errors);
/** * @param app * @param total * @param failures * @param errors */ public void addDataPoint(String app, long total, long failures, long errors) { ResponseStatsDataPoint point = new ResponseStatsDataPoint(null, total, failures, errors); data.put(app, point); }
/** * @param plan * @param total * @param failures * @param errors */ public void addDataPoint(String plan, long total, long failures, long errors) { ResponseStatsDataPoint point = new ResponseStatsDataPoint(null, total, failures, errors); data.put(plan, point); }
calendar.setTime(totalDataPoint.getStart()); String label = formatDateWithMillis(calendar); ResponseStatsDataPoint dataPoint = new ResponseStatsDataPoint(label, totalDataPoint.getSamples(), failureDataPoint.getSamples(), errorDataPoint.getSamples()); rval.getData().add(dataPoint);