Commit c19754d2 authored by Raysa Oliveira's avatar Raysa Oliveira Committed by Manoel Campos da Silva Filho
Browse files

Closes #100 (PR #106)

* Closes #100

Renamed the DatacenterBroker getVmsCreatedList() method to getVmCreatedList()
and added a getVmExecList() one.

Now the getVmExecList() method is the one which stores the list of all currently running VMs.
These VMs may or may not be running Cloudlets, but they are available
for new submitted Cloudlets to be placed into them.

The old getVmCreatedList() stores all created VMs for the broker
along the entire simulation time.
This way, the list of all created VMs can be queried after the simulation finishes.
parent 1129d9d4
......@@ -90,7 +90,7 @@ public class CloudSimExample0 {
/*Prints results when the simulation is over
(you can use your own code here to print what you want from this cloudlet list)*/
List<Cloudlet> finishedCloudlets = broker0.getCloudletsFinishedList();
List<Cloudlet> finishedCloudlets = broker0.getCloudletFinishedList();
new CloudletsTableBuilder(finishedCloudlets).build();
Log.printLine("CloudSimExample0 finished!");
}
......
......@@ -120,7 +120,7 @@ public class CloudSimExample1 {
simulation.start();
//Final step: Print results when simulation is over
List<Cloudlet> newList = broker.getCloudletsFinishedList();
List<Cloudlet> newList = broker.getCloudletFinishedList();
new CloudletsTableBuilder(newList).build();
Log.printFormattedLine("%s finished!", getClass().getSimpleName());
} catch (RuntimeException e) {
......
......@@ -136,7 +136,7 @@ public class CloudSimExample2 {
simulation.start();
// Final step: Print results when simulation is over
List<Cloudlet> newList = broker.getCloudletsFinishedList();
List<Cloudlet> newList = broker.getCloudletFinishedList();
new CloudletsTableBuilder(newList).build();
Log.printFormattedLine("%s finished!", getClass().getSimpleName());
......
......@@ -139,7 +139,7 @@ public class CloudSimExample3 {
simulation.start();
// Final step: Print results when simulation is over
List<Cloudlet> newList = broker.getCloudletsFinishedList();
List<Cloudlet> newList = broker.getCloudletFinishedList();
new CloudletsTableBuilder(newList).build();
Log.printFormattedLine("%s finished!", getClass().getSimpleName());
......
......@@ -135,7 +135,7 @@ public class CloudSimExample4 {
simulation.start();
// Final step: Print results when simulation is over
List<Cloudlet> newList = broker.getCloudletsFinishedList();
List<Cloudlet> newList = broker.getCloudletFinishedList();
new CloudletsTableBuilder(newList).build();
Log.printFormattedLine("%s finished!", getClass().getSimpleName());
} catch (RuntimeException e) {
......
......@@ -141,8 +141,8 @@ public class CloudSimExample5 {
simulation.start();
// Final step: Print results when simulation is over
List<Cloudlet> newList1 = broker1.getCloudletsFinishedList();
List<Cloudlet> newList2 = broker2.getCloudletsFinishedList();
List<Cloudlet> newList1 = broker1.getCloudletFinishedList();
List<Cloudlet> newList2 = broker2.getCloudletFinishedList();
new CloudletsTableBuilder(newList1).setTitle(broker1.getName()).build();
new CloudletsTableBuilder(newList2).setTitle(broker2.getName()).build();
......
......@@ -81,7 +81,7 @@ public class CloudSimExample6 {
simulation.start();
// Final step: Print results when simulation is over
List<Cloudlet> newList = broker.getCloudletsFinishedList();
List<Cloudlet> newList = broker.getCloudletFinishedList();
new CloudletsTableBuilder(newList).build();
Log.printFormattedLine("%s finished!", getClass().getSimpleName());
......
......@@ -135,7 +135,7 @@ public class NetworkExample1 {
simulation.start();
// Final step: Print results when simulation is over
List<Cloudlet> newList = broker.getCloudletsFinishedList();
List<Cloudlet> newList = broker.getCloudletFinishedList();
new CloudletsTableBuilder(newList).build();
Log.printFormattedLine("%s finished!", getClass().getSimpleName());
}
......
......@@ -157,7 +157,7 @@ public class NetworkExample2 {
simulation.start();
// Final step: Print results when simulation is over
List<Cloudlet> newList = broker.getCloudletsFinishedList();
List<Cloudlet> newList = broker.getCloudletFinishedList();
new CloudletsTableBuilder(newList).build();
Log.printFormattedLine("%s finished!", getClass().getSimpleName());
}
......
......@@ -164,8 +164,8 @@ public class NetworkExample3 {
simulation.start();
// Final step: Print results when simulation is over
List<Cloudlet> newList1 = broker1.getCloudletsFinishedList();
List<Cloudlet> newList2 = broker2.getCloudletsFinishedList();
List<Cloudlet> newList1 = broker1.getCloudletFinishedList();
List<Cloudlet> newList2 = broker2.getCloudletFinishedList();
new CloudletsTableBuilder(newList1)
.setTable(new TextTableBuilder("Broker " + broker1))
......
......@@ -125,7 +125,7 @@ public class NetworkExample4 {
simulation.start();
// Final step: Print results when simulation is over
List<Cloudlet> newList = broker.getCloudletsFinishedList();
List<Cloudlet> newList = broker.getCloudletFinishedList();
new CloudletsTableBuilder(newList).build();
Log.printFormattedLine("%s finished!", getClass().getSimpleName());
......
......@@ -118,7 +118,7 @@ abstract class NetworkVmExampleAbstract {
DatacenterBroker broker;
for(int i = 0; i < NUMBER_OF_APPS; i++){
broker = brokerList.get(i);
List<Cloudlet> newList = broker.getCloudletsFinishedList();
List<Cloudlet> newList = broker.getCloudletFinishedList();
String caption = broker.getName() + " - Application " + broker.getId();
new CloudletsTableBuilder(newList)
.setTable(new TextTableBuilder(caption))
......
......@@ -95,7 +95,7 @@ public class NetworkVmsExample1 {
}
private void showSimulationResults() {
List<Cloudlet> newList = broker.getCloudletsFinishedList();
List<Cloudlet> newList = broker.getCloudletFinishedList();
new CloudletsTableBuilder(newList).build();
for (NetworkHost host : datacenter.<NetworkHost>getHostList()) {
......
......@@ -80,7 +80,7 @@ public class NonPowerAware {
simulation.terminateAt(Constants.SIMULATION_LIMIT);
double lastClock = simulation.start();
List<Cloudlet> newList = broker.getCloudletsFinishedList();
List<Cloudlet> newList = broker.getCloudletFinishedList();
Log.printLine("Received " + newList.size() + " cloudlets");
helper.printResults(datacenter, vmList, lastClock);
......
......@@ -66,7 +66,7 @@ public class NonPowerAware {
simulation.terminateAt(Constants.SIMULATION_LIMIT);
double lastClock = simulation.start();
List<Cloudlet> newList = broker.getCloudletsFinishedList();
List<Cloudlet> newList = broker.getCloudletFinishedList();
Log.printLine("Received " + newList.size() + " cloudlets");
helper.printResults(datacenter, vmList, lastClock);
......
......@@ -166,7 +166,7 @@ public abstract class RunnerAbstract {
simulation.terminateAt(Constants.SIMULATION_LIMIT);
double lastClock = simulation.start();
List<Cloudlet> newList = broker.getCloudletsFinishedList();
List<Cloudlet> newList = broker.getCloudletFinishedList();
Log.printLine("Received " + newList.size() + " cloudlets");
helper.printResults(datacenter, vmList, lastClock);
......
......@@ -98,7 +98,7 @@ public class BasicFirstExample {
simulation.start();
final List<Cloudlet> finishedCloudlets = broker0.getCloudletsFinishedList();
final List<Cloudlet> finishedCloudlets = broker0.getCloudletFinishedList();
new CloudletsTableBuilder(finishedCloudlets).build();
}
......
......@@ -100,7 +100,7 @@ public class CloudletSchedulerSpaceSharedExample1 {
simulation.start();
final List<Cloudlet> finishedCloudlets = broker0.getCloudletsFinishedList();
final List<Cloudlet> finishedCloudlets = broker0.getCloudletFinishedList();
new CloudletsTableBuilder(finishedCloudlets).build();
}
......
......@@ -102,7 +102,7 @@ public class CloudletSchedulerTimeSharedExample1 {
simulation.start();
final List<Cloudlet> finishedCloudlets = broker0.getCloudletsFinishedList();
final List<Cloudlet> finishedCloudlets = broker0.getCloudletFinishedList();
new CloudletsTableBuilder(finishedCloudlets).build();
}
......
......@@ -116,7 +116,7 @@ public class CustomUtilizationModelExample {
/*Prints results when the simulation is over
(you can use your own code here to print what you want from this cloudlet list)*/
List<Cloudlet> finishedCloudlets = broker0.getCloudletsFinishedList();
List<Cloudlet> finishedCloudlets = broker0.getCloudletFinishedList();
new CloudletsTableBuilder(finishedCloudlets).build();
Log.printFormattedLine("%s finished!", getClass().getSimpleName());
}
......
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