Merged in fixSchedWindowSize (pull request #13)

FixSchedWindowSize

Approved-by: Akash Kothawale <akothaw1@binghamton.edu>
This commit is contained in:
Pradyumna Kaushik 2018-04-17 20:12:33 +00:00
parent f1c6adb05b
commit 8b27f5547d
5 changed files with 164 additions and 89 deletions

View file

@ -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
}