}
comStatsData.resetData();
for (Entry<String, TaskHeartbeat> compEntry : compList.entrySet()) {
TaskHeartbeat taskHb = compEntry.getValue();
CommonStatsData statsData = taskHb.getStats();
comStatsData.updateStatsData(statsData);
}
double avgLatency = (comStatsData.getLatency())/(compList.size());
comStatsData.updateLatency(avgLatency);
}