ExecutionFootprintList performance = p.getList();
for (Measure measure: getMeasures()) {
if (!measure.getUri().startsWith("machine:")) {
Measurement m = new Measurement();
m.setMeasureId(measure.getUri());
PositiveFloatValue v = (PositiveFloatValue) measure.getScale().createValue();
if (measure.getUri().equals(MeasureConstants.ELAPSED_TIME_PER_OBJECT)) {
v.setValue(performance.getTotalCpuTimeUsed());
}
if (measure.getUri().equals(MigrationResult.MIGRES_MEMORY_GROSS)) {
v.setValue(performance.getMaxVirtualMemory());
}
if (measure.getUri().equals(MigrationResult.MIGRES_MEMORY_NET)) {
v.setValue(performance.getMaxResidentSize());
}
if (measure.getUri().equals("performance:averageResidentSize")) {
v.setValue(performance.getAverageResidentSize());
} else if (measure.getUri().equals("performance:averageSharedMemory")) {
v.setValue(performance.getAverageSharedMemory());
} else if (measure.getUri().equals("performance:averageVirtualMemory")) {
v.setValue(performance.getAverageVirtualMemory());
} else if (measure.getUri().equals("performance:maxResidentSize")) {
v.setValue(performance.getMaxResidentSize());
} else if (measure.getUri().equals("performance:maxSharedMemory")) {
v.setValue(performance.getMaxSharedMemory());
} else if (measure.getUri().equals("performance:maxVirtualMemory")) {
v.setValue(performance.getMaxVirtualMemory());
} else if (measure.getUri().equals("performance:totalCpuTimeUsed")) {
v.setValue(performance.getTotalCpuTimeUsed());
}
m.setValue(v);
result.getMeasurements().put(measure.getUri(), m);
}
}
}