formatted code.
This commit is contained in:
parent
5a6edb802e
commit
5128c51b22
6 changed files with 10 additions and 10 deletions
|
@ -5,6 +5,8 @@ import (
|
||||||
"bitbucket.org/sunybingcloud/electron/def"
|
"bitbucket.org/sunybingcloud/electron/def"
|
||||||
"bitbucket.org/sunybingcloud/electron/pcp"
|
"bitbucket.org/sunybingcloud/electron/pcp"
|
||||||
"bitbucket.org/sunybingcloud/electron/rapl"
|
"bitbucket.org/sunybingcloud/electron/rapl"
|
||||||
|
"bitbucket.org/sunybingcloud/electron/utilities/mesosUtils"
|
||||||
|
"bitbucket.org/sunybingcloud/electron/utilities/offerUtils"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
mesos "github.com/mesos/mesos-go/mesosproto"
|
mesos "github.com/mesos/mesos-go/mesosproto"
|
||||||
|
@ -17,8 +19,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
"bitbucket.org/sunybingcloud/electron/utilities/offerUtils"
|
|
||||||
"bitbucket.org/sunybingcloud/electron/utilities/mesosUtils"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Decides if to take an offer or not
|
// Decides if to take an offer or not
|
||||||
|
|
|
@ -2,6 +2,8 @@ package schedulers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bitbucket.org/sunybingcloud/electron/def"
|
"bitbucket.org/sunybingcloud/electron/def"
|
||||||
|
"bitbucket.org/sunybingcloud/electron/utilities/mesosUtils"
|
||||||
|
"bitbucket.org/sunybingcloud/electron/utilities/offerUtils"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
mesos "github.com/mesos/mesos-go/mesosproto"
|
mesos "github.com/mesos/mesos-go/mesosproto"
|
||||||
|
@ -12,8 +14,6 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"bitbucket.org/sunybingcloud/electron/utilities/offerUtils"
|
|
||||||
"bitbucket.org/sunybingcloud/electron/utilities/mesosUtils"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Decides if to take an offer or not
|
// Decides if to take an offer or not
|
||||||
|
|
|
@ -5,6 +5,8 @@ import (
|
||||||
"bitbucket.org/sunybingcloud/electron/def"
|
"bitbucket.org/sunybingcloud/electron/def"
|
||||||
"bitbucket.org/sunybingcloud/electron/pcp"
|
"bitbucket.org/sunybingcloud/electron/pcp"
|
||||||
"bitbucket.org/sunybingcloud/electron/rapl"
|
"bitbucket.org/sunybingcloud/electron/rapl"
|
||||||
|
"bitbucket.org/sunybingcloud/electron/utilities/mesosUtils"
|
||||||
|
"bitbucket.org/sunybingcloud/electron/utilities/offerUtils"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
mesos "github.com/mesos/mesos-go/mesosproto"
|
mesos "github.com/mesos/mesos-go/mesosproto"
|
||||||
|
@ -17,8 +19,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
"bitbucket.org/sunybingcloud/electron/utilities/offerUtils"
|
|
||||||
"bitbucket.org/sunybingcloud/electron/utilities/mesosUtils"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// electron scheduler implements the Scheduler interface
|
// electron scheduler implements the Scheduler interface
|
||||||
|
|
|
@ -5,6 +5,8 @@ import (
|
||||||
"bitbucket.org/sunybingcloud/electron/def"
|
"bitbucket.org/sunybingcloud/electron/def"
|
||||||
"bitbucket.org/sunybingcloud/electron/pcp"
|
"bitbucket.org/sunybingcloud/electron/pcp"
|
||||||
"bitbucket.org/sunybingcloud/electron/rapl"
|
"bitbucket.org/sunybingcloud/electron/rapl"
|
||||||
|
"bitbucket.org/sunybingcloud/electron/utilities/mesosUtils"
|
||||||
|
"bitbucket.org/sunybingcloud/electron/utilities/offerUtils"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
mesos "github.com/mesos/mesos-go/mesosproto"
|
mesos "github.com/mesos/mesos-go/mesosproto"
|
||||||
|
@ -16,8 +18,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
"bitbucket.org/sunybingcloud/electron/utilities/offerUtils"
|
|
||||||
"bitbucket.org/sunybingcloud/electron/utilities/mesosUtils"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Decides if to take an offer or not
|
// Decides if to take an offer or not
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package mesosUtils
|
package mesosUtils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
mesos "github.com/mesos/mesos-go/mesosproto"
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
mesos "github.com/mesos/mesos-go/mesosproto"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -32,7 +32,7 @@ func getInstance(curSum float64, wSize int) *runningAverageCalculator {
|
||||||
if racSingleton == nil {
|
if racSingleton == nil {
|
||||||
racSingleton = &runningAverageCalculator{
|
racSingleton = &runningAverageCalculator{
|
||||||
considerationWindowSize: wSize,
|
considerationWindowSize: wSize,
|
||||||
currentSum: curSum,
|
currentSum: curSum,
|
||||||
}
|
}
|
||||||
return racSingleton
|
return racSingleton
|
||||||
} else {
|
} else {
|
||||||
|
|
Reference in a new issue