From 875eaa16f1cadc0b40a944bbc5795b46cc1d332c Mon Sep 17 00:00:00 2001 From: armanriazi Date: Thu, 9 Apr 2020 09:20:20 +0000 Subject: [PATCH] Update WorkflowSimBasicExample1.java with uncommenting, you can see more details of the workflow. for montage, we will get one more tuple on results as jpeg --- .../examples/WorkflowSimBasicExample1.java | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/examples/org/workflowsim/examples/WorkflowSimBasicExample1.java b/examples/org/workflowsim/examples/WorkflowSimBasicExample1.java index 0f0fae63..45281ce4 100644 --- a/examples/org/workflowsim/examples/WorkflowSimBasicExample1.java +++ b/examples/org/workflowsim/examples/WorkflowSimBasicExample1.java @@ -250,8 +250,23 @@ protected static WorkflowDatacenter createDatacenter(String name) { */ protected static void printJobList(List list) { String indent = " "; + /*double cost = 0.0; + double time = 0.0; + double length = 0.0;*/ Log.printLine(); Log.printLine("========== OUTPUT =========="); + /* + Log.printLine("Cloudlet Column=Task=>Length,WFType,Impact # Times of Task=>Actual,Exec,Finish.");//,CloudletOutputSize + Log.printLine(); + Log.printLine(indent + "Row" + indent + "JOB ID" + indent + indent + "CLOUDLET" + indent + indent + + "STATUS" + indent + + "Data CENTER ID" + indent + //+ "HOST ID" + indent + + "CONTAINER(ID" + indent + indent + "SIZE)" + indent + indent + + "TIME" + indent + indent + "START TIME" + indent + indent + "FINISH TIME" + indent + "DEPTH" + indent + indent + "COST"); + DecimalFormat dft0 = new DecimalFormat("###.#"); + DecimalFormat dft = new DecimalFormat("####.###"); + */ Log.printLine("Job ID" + indent + "Task ID" + indent + "STATUS" + indent + "Data center ID" + indent + "VM ID" + indent + indent + "Time" + indent + "Start Time" + indent + "Finish Time" + indent + "Depth"); @@ -263,22 +278,49 @@ protected static void printJobList(List list) { } for (Task task : job.getTaskList()) { Log.print(task.getCloudletId() + ","); + /* + Log.print(task.getCloudletLength() + " ,"); + Log.print(task.getType()); + + //Log.print(dft0.format(task.getImpact())); + Log.print("\n" + "\t\t\t (" + dft0.format(task.getActualCPUTime()) + " ,"); + Log.print("\n" + "\t\t\t" + dft0.format(task.getExecStartTime()) + " ,"); + Log.print("\n" + "\t\t\t" + dft0.format(task.getTaskFinishTime()) + " )"); + */ } Log.print(indent); + /* + cost += job.getProcessingCost(); + time += job.getActualCPUTime(); + length += job.getCloudletLength(); + */ + if (job.getCloudletStatus() == Cloudlet.SUCCESS) { Log.print("SUCCESS"); Log.printLine(indent + indent + job.getResourceId() + indent + indent + indent + job.getVmId() + indent + indent + indent + dft.format(job.getActualCPUTime()) + indent + indent + dft.format(job.getExecStartTime()) + indent + indent + indent + dft.format(job.getFinishTime()) + indent + indent + indent + job.getDepth()); + //+ indent + indent + indent + dft.format(job.getProcessingCost()) } else if (job.getCloudletStatus() == Cloudlet.FAILED) { Log.print("FAILED"); Log.printLine(indent + indent + job.getResourceId() + indent + indent + indent + job.getVmId() + indent + indent + indent + dft.format(job.getActualCPUTime()) + indent + indent + dft.format(job.getExecStartTime()) + indent + indent + indent + dft.format(job.getFinishTime()) + indent + indent + indent + job.getDepth()); + ////+ indent + indent + indent + dft.format(job.getProcessingCost()) } } + /* + Log.printLine(); + Log.printLine("MinTimeBetweenEvents is " + dft.format(CloudSim.getMinTimeBetweenEvents())); + Log.printLine("----------------------------------------"); + Log.printLine("The total cost is " + dft.format(cost)); + Log.printLine("The total actual cpu time is " + dft.format(time)); + Log.printLine("The length cloudlets is " + dft.format(length)); + Log.printLine("The total failed counter is " + dft.format(failed_counter)); + Log.printLine("The total success counter is " + dft.format(success_counter)); + */ } }