retrofitted to use the generic task sorter.

This commit is contained in:
Pradyumna Kaushik 2017-09-26 00:37:12 -04:00
parent 180e85ddfa
commit 59266d207d
4 changed files with 3 additions and 35 deletions

View file

@ -11,7 +11,6 @@ import (
sched "github.com/mesos/mesos-go/scheduler"
"log"
"os"
"sort"
"time"
)
@ -40,7 +39,7 @@ type BinPackSortedWatts struct {
// New elektron scheduler
func NewBinPackSortedWatts(tasks []def.Task, wattsAsAResource bool, schedTracePrefix string, classMapWatts bool) *BinPackSortedWatts {
sort.Sort(def.WattsSorter(tasks))
def.SortTasks(tasks, def.SortByWatts)
logFile, err := os.Create("./" + schedTracePrefix + "_schedTrace.log")
if err != nil {

View file

@ -11,7 +11,6 @@ import (
sched "github.com/mesos/mesos-go/scheduler"
"log"
"os"
"sort"
"time"
)
@ -41,7 +40,7 @@ type BPSWMaxMinWatts struct {
// New elektron scheduler
func NewBPSWMaxMinWatts(tasks []def.Task, wattsAsAResource bool, schedTracePrefix string, classMapWatts bool) *BPSWMaxMinWatts {
sort.Sort(def.WattsSorter(tasks))
def.SortTasks(tasks, def.SortByWatts)
logFile, err := os.Create("./" + schedTracePrefix + "_schedTrace.log")
if err != nil {