}
}
}
if (endLog != null && startLog != null) {
Statistics statistics;
switch (componentType) {
case SEQUENCE: {
if (startLog.isResponse()) {
statistics = statisticsView.getOutStatistics();
} else {
statistics = statisticsView.getInStatistics();
}
statistics.update(endLog.getTime() - startLog.getTime(), endLog.isFault());
if (endLog.isFault()) {
statistics.addErrorLog(endLog.getErrorLog());
}
break;
}
case ENDPOINT: {
statistics = statisticsView.getInStatistics();
statistics.update(endLog.getTime() - startLog.getTime(), endLog.isFault());
if (endLog.isFault()) {
statistics.addErrorLog(endLog.getErrorLog());
}
break;
}
case PROXYSERVICE: {
Statistics inStatistics = statisticsView.getInStatistics();
Statistics outStatistics = statisticsView.getOutStatistics();
inStatistics.update(endLog.getTime() - startLog.getTime(), endLog.isFault());
if (endLog.isFault()) {
inStatistics.addErrorLog(endLog.getErrorLog());
}
if (!endLog.isEndAnyLog()) {
StatisticsLog lastLog = statisticsLogs.get(statisticsLogs.size() - 1);
if (lastLog != endLog) {
outStatistics.update(
lastLog.getTime() - endLog.getTime(), lastLog.isFault());
if (lastLog.isFault()) {
outStatistics.addErrorLog(lastLog.getErrorLog());
}
}
}
return;
}
}
startLog = null;
endLog = null;
}
}
if (startLog != null && componentType == ComponentType.PROXYSERVICE) {
Statistics inStatistics = statisticsView.getInStatistics();
StatisticsLog lastLog = statisticsLogs.get(statisticsLogs.size() - 1);
if (lastLog != startLog) {
inStatistics.update(lastLog.getTime() - startLog.getTime(), lastLog.isFault());
}
}
}