- Timestamp:
- 04/12/12 08:02:02 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
xssim/branches/tpiontek/src/example/timeestimation/ExecTimeEstimationPlugin.java
r241 r250 47 47 double remainingLength = task.getLength() * (1- completionPercentage); 48 48 // do the calculation 49 double execTime = (remainingLength / (cnt * speed/1000)); 49 50 51 int type = Integer.parseInt( task.getJobId()) % 4; 52 53 double factor = 1; 54 if( type == 0 && ((Processor)pes.get(0)).getComputingNode().getCategory().getName().equals("A")) 55 { 56 factor = 0.6; 57 } 58 59 double execTime = (remainingLength / (cnt * (double)speed * factor / 1000)); 60 50 61 51 62 // if the result is very close to 0, but less then one millisecond then round this result to 0.001 … … 56 67 // time is measured in integer units, so get the nearest execTime int value. 57 68 execTime = Math.ceil(execTime); 69 58 70 return execTime; 59 71 }
Note: See TracChangeset
for help on using the changeset viewer.