Merged in fixSchedWindowSize (pull request #13)
FixSchedWindowSize Approved-by: Akash Kothawale <akothaw1@binghamton.edu>
This commit is contained in:
parent
f1c6adb05b
commit
8b27f5547d
5 changed files with 164 additions and 89 deletions
|
@ -86,14 +86,14 @@ func (s *fillNextOfferCycle) apply(taskQueue []def.Task) (int, int) {
|
|||
// Setting window as the length of the entire queue.
|
||||
// Also setting numberOfTasksTraversed to the number of tasks in the entire queue.
|
||||
// TODO: Create another resizing strategy that sizes the window to the length of the entire pending queue.
|
||||
flattenedLength := 0
|
||||
numTasks := 0
|
||||
for _, ts := range taskQueue {
|
||||
numTasks++
|
||||
flattenedLength += *ts.Instances
|
||||
}
|
||||
newSchedWindow = flattenedLength
|
||||
numberOfTasksTraversed = numTasks
|
||||
// flattenedLength := 0
|
||||
// numTasks := 0
|
||||
// for _, ts := range taskQueue {
|
||||
// numTasks++
|
||||
// flattenedLength += *ts.Instances
|
||||
// }
|
||||
// newSchedWindow = flattenedLength
|
||||
// numberOfTasksTraversed = numTasks
|
||||
|
||||
return newSchedWindow, numberOfTasksTraversed
|
||||
}
|
||||
|
|
Reference in a new issue