From 5a28f8539aff6ebc20bfbaf105d870258a7e5ed4 Mon Sep 17 00:00:00 2001 From: Pradyumna Kaushik Date: Mon, 5 Feb 2018 18:21:34 -0500 Subject: [PATCH] formatted code. --- pcp/pcp.go | 2 +- schedulers/base.go | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/pcp/pcp.go b/pcp/pcp.go index 9d1aac2..8986586 100644 --- a/pcp/pcp.go +++ b/pcp/pcp.go @@ -6,11 +6,11 @@ import ( "bufio" "fmt" "github.com/mesos/mesos-go/api/v0/scheduler" + "github.com/montanaflynn/stats" "log" "os/exec" "syscall" "time" - "github.com/montanaflynn/stats" ) func Start(quit chan struct{}, logging *bool, logMType chan elecLogDef.LogMessageType, logMsg chan string, s scheduler.Scheduler) { diff --git a/schedulers/base.go b/schedulers/base.go index 9cdf50d..f7ab082 100644 --- a/schedulers/base.go +++ b/schedulers/base.go @@ -21,15 +21,16 @@ type BaseScheduler struct { // Current scheduling policy used for resource offer consumption. curSchedPolicy SchedPolicyState - tasksCreated int - tasksRunning int - tasks []def.Task - metrics map[string]def.Metric - Running map[string]map[string]bool - wattsAsAResource bool - classMapWatts bool - TasksRunningMutex sync.Mutex - HostNameToSlaveID map[string]string + tasksCreated int + tasksRunning int + tasks []def.Task + metrics map[string]def.Metric + Running map[string]map[string]bool + wattsAsAResource bool + classMapWatts bool + TasksRunningMutex sync.Mutex + HostNameToSlaveID map[string]string + totalResourceAvailabilityRecorded bool // First set of PCP values are garbage values, signal to logger to start recording when we're // about to schedule a new task