formatted code
This commit is contained in:
parent
435c4ca1bc
commit
b58ffdbdd6
2 changed files with 3 additions and 3 deletions
|
@ -60,13 +60,13 @@ type BaseScheduler struct {
|
||||||
// Size of window of tasks that can be scheduled in the next offer cycle.
|
// Size of window of tasks that can be scheduled in the next offer cycle.
|
||||||
// The window size can be adjusted to make the most use of every resource offer.
|
// The window size can be adjusted to make the most use of every resource offer.
|
||||||
// By default, the schedulingWindow would correspond to all the remaining tasks that haven't yet been scheduled.
|
// By default, the schedulingWindow would correspond to all the remaining tasks that haven't yet been scheduled.
|
||||||
schedulingWindow int
|
schedulingWindow int
|
||||||
|
|
||||||
// Strategy to resize the schedulingWindow.
|
// Strategy to resize the schedulingWindow.
|
||||||
schedWindowResStrategy schedUtils.SchedWindowResizingStrategy
|
schedWindowResStrategy schedUtils.SchedWindowResizingStrategy
|
||||||
// Window of tasks that the current scheduling policy has to schedule.
|
// Window of tasks that the current scheduling policy has to schedule.
|
||||||
// Once #schedWindow tasks are scheduled, the current scheduling policy has to stop scheduling.
|
// Once #schedWindow tasks are scheduled, the current scheduling policy has to stop scheduling.
|
||||||
curSchedWindow int
|
curSchedWindow int
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *BaseScheduler) init(opts ...schedPolicyOption) {
|
func (s *BaseScheduler) init(opts ...schedPolicyOption) {
|
||||||
|
|
|
@ -21,7 +21,7 @@ type SchedWindowResizingStrategy interface {
|
||||||
|
|
||||||
// Scheduling window resizing strategy that attempts to resize the scheduling window
|
// Scheduling window resizing strategy that attempts to resize the scheduling window
|
||||||
// to include as many tasks as possible so as to make the most use of the next offer cycle.
|
// to include as many tasks as possible so as to make the most use of the next offer cycle.
|
||||||
type fillNextOfferCycle struct {}
|
type fillNextOfferCycle struct{}
|
||||||
|
|
||||||
func (s *fillNextOfferCycle) Apply(getArgs func() interface{}) int {
|
func (s *fillNextOfferCycle) Apply(getArgs func() interface{}) int {
|
||||||
return s.apply(getArgs().([]def.Task))
|
return s.apply(getArgs().([]def.Task))
|
||||||
|
|
Reference in a new issue