Commit e4068c6d authored by Anton Beloglazov's avatar Anton Beloglazov

- Fixed the calculation of the overall SLA violation for the Power examples

parent 89d68c3f
......@@ -143,7 +143,7 @@ public class DVFS {
Log.printLine(String.format("Energy consumption: %.2f kWh", datacenter.getPower() / (3600 * 1000)));
Log.printLine(String.format("Number of VM migrations: %d", datacenter.getMigrationCount()));
Log.printLine(String.format("Number of SLA violations: %d", sla.size()));
Log.printLine(String.format("SLA violation percentage: %.2f%%", (double) sla.size() * 100 / numberOfAllocations));
Log.printLine(String.format("SLA violation: %.2f%%", 100 * ((double) totalTotalRequested - totalTotalAllocated) / totalTotalRequested));
Log.printLine(String.format("Average SLA violation: %.2f%%", averageSla));
Log.printLine();
......
......@@ -143,7 +143,7 @@ public class NonPowerAware {
Log.printLine(String.format("Energy consumption: %.2f kWh", datacenter.getPower() / (3600 * 1000)));
Log.printLine(String.format("Number of VM migrations: %d", datacenter.getMigrationCount()));
Log.printLine(String.format("Number of SLA violations: %d", sla.size()));
Log.printLine(String.format("SLA violation percentage: %.2f%%", (double) sla.size() * 100 / numberOfAllocations));
Log.printLine(String.format("Overall SLA violation: %.2f%%", 100 * ((double) totalTotalRequested - totalTotalAllocated) / totalTotalRequested));
Log.printLine(String.format("Average SLA violation: %.2f%%", averageSla));
Log.printLine();
......
......@@ -145,7 +145,7 @@ public class SingleThreshold {
Log.printLine(String.format("Energy consumption: %.2f kWh", datacenter.getPower() / (3600 * 1000)));
Log.printLine(String.format("Number of VM migrations: %d", datacenter.getMigrationCount()));
Log.printLine(String.format("Number of SLA violations: %d", sla.size()));
Log.printLine(String.format("SLA violation percentage: %.2f%%", (double) sla.size() * 100 / numberOfAllocations));
Log.printLine(String.format("Overall SLA violation: %.2f%%", 100 * ((double) totalTotalRequested - totalTotalAllocated) / totalTotalRequested));
Log.printLine(String.format("Average SLA violation: %.2f%%", averageSla));
Log.printLine();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment