long transmittedBytesSum = 0;
// Sum up the individual values
while (instanceIterator.hasNext()) {
final InternalInstanceProfilingData profilingData = this.collectedInstanceProfilingData
.get(instanceIterator.next());
freeMemorySum += profilingData.getFreeMemory();
ioWaitCPUSum += profilingData.getIOWaitCPU();
idleCPUSum += profilingData.getIdleCPU();
profilingIntervalSum += profilingData.getProfilingInterval();
systemCPUSum += profilingData.getSystemCPU();
hardIrqCPUSum += profilingData.getHardIrqCPU();
softIrqCPUSum += profilingData.getSoftIrqCPU();
totalMemorySum += profilingData.getTotalMemory();
userCPUSum += profilingData.getUserCPU();
receivedBytesSum += profilingData.getReceivedBytes();
transmittedBytesSum += profilingData.getTransmittedBytes();
bufferedMemorySum += profilingData.getBufferedMemory();
cachedMemorySum += profilingData.getCachedMemory();
cachedSwapMemorySum += profilingData.getCachedSwapMemory();
}
final InstanceSummaryProfilingEvent instanceSummary = new InstanceSummaryProfilingEvent(profilingIntervalSum
/ numberOfInstances, ioWaitCPUSum / numberOfInstances, idleCPUSum / numberOfInstances, userCPUSum
/ numberOfInstances, systemCPUSum / numberOfInstances, hardIrqCPUSum / numberOfInstances, softIrqCPUSum