- Timestamp:
- 03/19/14 18:22:27 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/simulator/DCWormsUsers.java
r1207 r1299 74 74 sendJobsIds = new HashSet<String>(); 75 75 returnedJobsIds = new HashSet<String>(); 76 76 returnedJobs = new ArrayList<JobInterface<?>>(); 77 77 this.xsltTransformer = new XsltTransformations(); 78 78 } … … 80 80 @Override 81 81 public void body() { 82 sendJobs(); 83 collectJobs(); 82 if(workloadLoader != null){ 83 sendJobs(); 84 collectJobs(); 85 } else { 86 submissionStartTime = 0; 87 } 84 88 85 89 //GridSim dependent code for shutting down the simulation … … 93 97 */ 94 98 protected void collectJobs() { 95 final int FACTOR = Math.min(10 , workloadLoader.getTaskCount()); //the refresh rate of the gauge: at most 10 times99 final int FACTOR = Math.min(100, workloadLoader.getTaskCount() > 0 ? workloadLoader.getTaskCount() : 1); //the refresh rate of the gauge: at most 10 times 96 100 final int denominator = workloadLoader.getTaskCount() / FACTOR; 97 101 allTasksAreFinished = true; 98 returnedJobs = new ArrayList<JobInterface<?>>();99 102 int counter = 0; 100 103 int oldRemeinder = 0; … … 244 247 245 248 public List<JobDescription> getAllSentJobs() { 249 if (workloadLoader == null) 250 return new ArrayList<JobDescription>(); 246 251 return (List<JobDescription>) workloadLoader.getJobs(); 247 252 } … … 349 354 350 355 public boolean isSimStartTimeDefined(){ 356 if(workloadLoader == null){ 357 return false; 358 } 351 359 return workloadLoader.isSimStartTimeDefined(); 352 360 }
Note: See TracChangeset
for help on using the changeset viewer.