refactored logging/types imports to dot imports
This commit is contained in:
parent
6fb0e4a3fe
commit
3b70a13cc8
10 changed files with 82 additions and 82 deletions
|
@ -27,7 +27,7 @@ import (
|
|||
"github.com/montanaflynn/stats"
|
||||
log "github.com/sirupsen/logrus"
|
||||
elekLog "github.com/spdfg/elektron/logging"
|
||||
elekLogTypes "github.com/spdfg/elektron/logging/types"
|
||||
. "github.com/spdfg/elektron/logging/types"
|
||||
)
|
||||
|
||||
// Information about a cluster of tasks.
|
||||
|
@ -52,7 +52,7 @@ func (tc TasksToClassify) taskObservationCalculator(task Task) []float64 {
|
|||
} else if task.Watts != 0.0 {
|
||||
return []float64{task.Watts}
|
||||
} else {
|
||||
elekLog.Log(elekLogTypes.CONSOLE, log.FatalLevel, "Unable to classify tasks. Missing Watts or ClassToWatts attribute in workload")
|
||||
elekLog.Log(CONSOLE, log.FatalLevel, "Unable to classify tasks. Missing Watts or ClassToWatts attribute in workload")
|
||||
return []float64{0.0} // Won't reach here.
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ func clusterSizeAvgMMMPU(tasks []Task, taskObservation func(task Task) []float64
|
|||
} else {
|
||||
// skip this value
|
||||
// there is an error in the task config.
|
||||
elekLog.Log(elekLogTypes.CONSOLE, log.ErrorLevel, err.Error())
|
||||
elekLog.Log(CONSOLE, log.ErrorLevel, err.Error())
|
||||
}
|
||||
} else {
|
||||
// There is only one observation for the task.
|
||||
|
|
Reference in a new issue