if (attribute != null) {
processed = (Integer) attribute.refresh();
}
success = processed.intValue();
counter += processed.intValue();
report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
} else if (metricName.equals(FAILED_METRIC_NAME)) {
EmsAttribute attribute = this.bean.getAttribute(actionName + " " + FAILED_PROCESSED);
Integer processed = new Integer(0);
if (attribute != null) {
processed = (Integer) attribute.refresh();
}
failed = processed.intValue();
counter += processed.intValue();
report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
} else if (metricName.equals(PROCESSINGTIME_METRIC_NAME)) {
EmsAttribute attribute = this.bean.getAttribute(actionName + " " + PROCESSING_TIME);
Double processed = (Double) attribute.refresh();
if (processed != null) {
processed = new Double(processed.doubleValue() / 1000000);
report.addData(new MeasurementDataNumeric(request, processed));
} else {
report.addData(new MeasurementDataNumeric(request, new Double(0)));
}
} else if (metricName.equals(BYTESPROCESSED_METRIC_NAME)) {
EmsAttribute attribute = this.bean.getAttribute(actionName + " " + OVERALL_BYTES_PROCESSED);
Long bytesProcessed = new Long(0);
if (attribute != null) {
bytesProcessed = (Long) attribute.refresh();
counterBytesProcessed = bytesProcessed.longValue();
}
report.addData(new MeasurementDataNumeric(request, new Double(bytesProcessed.doubleValue())));
} else if (metricName.equals(BYTESFAILED_METRIC_NAME)) {
EmsAttribute attribute = this.bean.getAttribute(actionName + " " + OVERALL_BYTES_FAILED);
Long bytesFailed = new Long(0);
if (attribute != null) {
bytesFailed = (Long) attribute.refresh();
counterBytesFailed += bytesFailed.longValue();
}
report.addData(new MeasurementDataNumeric(request, new Double(bytesFailed.doubleValue())));
}
}
for (MeasurementScheduleRequest request : requests) {
String metricName = request.getName();
if (metricName.equals (OVERALL_METRIC_NAME)) {
report.addData(new MeasurementDataNumeric(request, new Double(counter)));
} else if (metricName.equals(OVERALL_MINUTE_METRIC_NAME)) {
report.addData(new MeasurementDataNumeric(request, new Double(counter)));
} else if (metricName.equals(SUCCESS_MINUTE_METRIC_NAME)) {
report.addData(new MeasurementDataNumeric(request, new Double(success)));
} else if (metricName.equals(FAILED_MINUTE_METRIC_NAME)) {
report.addData(new MeasurementDataNumeric(request, new Double(failed)));
} else if (metricName.equals(OVERALL_BYTES_METRIC_NAME)) {
report.addData(new MeasurementDataNumeric(request, new Double(counterBytesProcessed + counterBytesFailed)));
}
}
}