ExecutionFootprintList performance = p.getList();
//log.debug(performance.toString());
for (MeasurableProperty property: getMeasurableProperties()) {
if (!property.getName().startsWith("machine:")) {
Measurement m = new Measurement();
m.setProperty(property);
PositiveFloatValue v = (PositiveFloatValue) property.getScale().createValue();
if (property.getName().equals(MigrationResult.MIGRES_USED_TIME)) {
v.setValue(performance.getTotalCpuTimeUsed());
}
if (property.getName().equals(MigrationResult.MIGRES_MEMORY_GROSS)) {
v.setValue(performance.getMaxVirtualMemory());
}
if (property.getName().equals(MigrationResult.MIGRES_MEMORY_NET)) {
v.setValue(performance.getMaxResidentSize());
}
if (property.getName().equals("performance:averageResidentSize")) {
v.setValue(performance.getAverageResidentSize());
} else if (property.getName().equals("performance:averageSharedMemory")) {
v.setValue(performance.getAverageSharedMemory());
} else if (property.getName().equals("performance:averageVirtualMemory")) {
v.setValue(performance.getAverageVirtualMemory());
} else if (property.getName().equals("performance:maxResidentSize")) {
v.setValue(performance.getMaxResidentSize());
} else if (property.getName().equals("performance:maxSharedMemory")) {
v.setValue(performance.getMaxSharedMemory());
} else if (property.getName().equals("performance:maxVirtualMemory")) {
v.setValue(performance.getMaxVirtualMemory());
} else if (property.getName().equals("performance:totalCpuTimeUsed")) {
v.setValue(performance.getTotalCpuTimeUsed());
}
m.setValue(v);
result.getMeasurements().put(property.getName(), m);
}
}
}