This repository has been archived on 2024-04-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
elektron/def/sortingCriteria.go
Pradyumna Kaushik 85383da550 Merged in scheduleOnlySchedWindowTasks (pull request #6)
ScheduleOnlySchedWindowTasks

Approved-by: Akash Kothawale <akothaw1@binghamton.edu>
2018-09-23 19:07:22 -04:00

13 lines
467 B
Go

package def
// the sortBy function that takes a task reference and returns the resource to consider when sorting.
type SortBy func(task *Task) float64
// Possible Sorting Criteria.
// Each holds a closure that fetches the required resource from the
// given task reference.
var (
SortByCPU = func(task *Task) float64 { return task.CPU }
SortByRAM = func(task *Task) float64 { return task.RAM }
SortByWatts = func(task *Task) float64 { return task.Watts }
)