/** * @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; }
/** * @see java.lang.Object#toString() */ @SuppressWarnings("nls") @Override public String toString() { return getLabel() + "[t:" + getTotal() + " f:" + getFailures() + " e:" + getErrors() + "]"; }
/** * @see java.lang.Object#toString() */ @SuppressWarnings("nls") @Override public String toString() { return getLabel() + "[t:" + getTotal() + " f:" + getFailures() + " e:" + getErrors() + "]"; }
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);
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);