Achilleas Tzenetopoulos 5 anni fa
parent
commit
beb0a40d36

+ 1 - 1
kubernetes-v1.15.4/pkg/scheduler/customcache/cache.go

@@ -125,7 +125,7 @@ func (c *MlabCache) UpdateCache(input map[string]float64, c6res float64, nodenam
 		"ipc":       input["ipc"],
 		"mem_read":  input["mem_read"],
 		"mem_write": input["mem_write"],
-		"c6res":     input["c6res"],
+		"c6res":     c6res,
 	}
 	c.Mux.Unlock()
 

+ 2 - 1
kubernetes-v1.15.4/pkg/scheduler/scheduler.go

@@ -252,13 +252,14 @@ func NewFromConfig(config *factory.Config) *Scheduler {
 	}
 }
 
+var timeout *time.Ticker = time.NewTicker(time.Duration(10 * time.Second))
+
 // Run begins watching and scheduling. It waits for cache to be synced, then starts a goroutine and returns immediately.
 func (sched *Scheduler) Run() {
 	if !sched.config.WaitForCacheSync() {
 		return
 	}
 
-	var timeout *time.Ticker = time.NewTicker(time.Duration(10 * time.Second))
 	go wait.Until(sched.scheduleOne, 0, sched.config.StopEverything)
 }