0% found this document useful (0 votes)
5 views

Cloudsim

Uploaded by

shamaparveen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Cloudsim

Uploaded by

shamaparveen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

return broker;

private static void

printCloudletList(List<Cloudlet> list)

int size = list.size();

Cloudlet cloudlet;

String indent = " ";

Log.printLine();

Log.printLine("========== OUTPUT ==========");

Log.printLine("Cloudlet ID" + indent + "STATUS"

+ indent + "Data center ID" + indent

+ "VM ID" + indent + "Time" + indent

+ "Start Time" + indent

+ "Finish Time");

DecimalFormat dft = new DecimalFormat("###.##");


for (int i = 0; i < size; i++) {

cloudlet = list.get(i);

Log.print(indent + cloudlet.getCloudletId()

+ indent + indent);

if (cloudlet.getCloudletStatus()

== Cloudlet.SUCCESS) {

Log.print("SUCCESS");

Log.printLine(

indent + indent

+ cloudlet.getResourceId() + indent

+ indent + indent + cloudlet.getVmId()

+ indent + indent

+ dft.format(

cloudlet.getActualCPUTime())

+ indent + indent

+ dft.format(

cloudlet.getExecStartTime())

+ indent + indent
+ dft.format(cloudlet.getFinishTime()));

Step 5: Output after running the program is shown. One can see all the VM
and cloudlets are created and their finish time(performance) is different as
their VM and cloudlet configurations were different.

You might also like