}
List<ThroughputStat> throughputStats = new ArrayList<ThroughputStat>();
if (!(rowCount == 0 && rowSize == 0)) {
// 处理Throughput stat
ThroughputStat rowThroughputStat = new ThroughputStat();
rowThroughputStat.setType(ThroughputType.ROW);
rowThroughputStat.setPipelineId(identity.getPipelineId());
rowThroughputStat.setNumber(rowCount);
rowThroughputStat.setSize(rowSize);
rowThroughputStat.setStartTime(new Date(throughput.getStartTime()));
rowThroughputStat.setEndTime(endTime);
throughputStats.add(rowThroughputStat);
}
if (!(fileCount == 0 && fileSize == 0)) {
ThroughputStat fileThroughputStat = new ThroughputStat();
fileThroughputStat.setType(ThroughputType.FILE);
fileThroughputStat.setPipelineId(identity.getPipelineId());
fileThroughputStat.setNumber(fileCount);
fileThroughputStat.setSize(fileSize);
fileThroughputStat.setStartTime(new Date(throughput.getStartTime()));
fileThroughputStat.setEndTime(endTime);
throughputStats.add(fileThroughputStat);
}
// add by 2012-07-06 for mq loader
if (!(mqCount == 0 && mqSize == 0)) {
ThroughputStat mqThroughputStat = new ThroughputStat();
mqThroughputStat.setType(ThroughputType.MQ);
mqThroughputStat.setPipelineId(identity.getPipelineId());
mqThroughputStat.setNumber(mqCount);
mqThroughputStat.setSize(mqSize);
mqThroughputStat.setStartTime(new Date(throughput.getStartTime()));
mqThroughputStat.setEndTime(endTime);
throughputStats.add(mqThroughputStat);
}
if (!CollectionUtils.isEmpty(throughputStats)) {
statisticsClientService.sendThroughputs(throughputStats);