|
@@ -2,8 +2,6 @@ package customcache
|
|
|
|
|
|
import (
|
|
import (
|
|
"sync"
|
|
"sync"
|
|
-
|
|
|
|
- "k8s.io/klog"
|
|
|
|
)
|
|
)
|
|
|
|
|
|
//var timeout *time.Ticker = time.NewTicker(time.Duration(10 * time.Second))
|
|
//var timeout *time.Ticker = time.NewTicker(time.Duration(10 * time.Second))
|
|
@@ -131,7 +129,7 @@ func (c *MlabCache) UpdateCache(input map[string]float64, c6res float64, nodenam
|
|
}
|
|
}
|
|
c.Mux.Unlock()
|
|
c.Mux.Unlock()
|
|
|
|
|
|
- klog.Infof("After cache update")
|
|
|
|
|
|
+ //klog.Infof("After cache update")
|
|
c.printCached(nodename)
|
|
c.printCached(nodename)
|
|
return nil
|
|
return nil
|
|
}
|
|
}
|
|
@@ -150,11 +148,11 @@ func (c *MlabCache) AddAppMetrics(app map[string]float64, nodename string, numCo
|
|
//TODO
|
|
//TODO
|
|
// handle ipc addition
|
|
// handle ipc addition
|
|
c.Mux.Unlock()
|
|
c.Mux.Unlock()
|
|
- klog.Infof("After application metrics addition")
|
|
|
|
|
|
+ //klog.Infof("After application metrics addition")
|
|
c.printCached(nodename)
|
|
c.printCached(nodename)
|
|
}
|
|
}
|
|
|
|
|
|
func (c *MlabCache) printCached(nodename string) {
|
|
func (c *MlabCache) printCached(nodename string) {
|
|
- klog.Infof("IPC: %v, Reads: %v, Writes: %v, C6res: %v", c.Cache[nodename]["ipc"], c.Cache[nodename]["mem_read"],
|
|
|
|
- c.Cache[nodename]["mem_write"], c.Cache[nodename]["c6res"])
|
|
|
|
|
|
+ //klog.Infof("IPC: %v, Reads: %v, Writes: %v, C6res: %v", c.Cache[nodename]["ipc"], c.Cache[nodename]["mem_read"],
|
|
|
|
+ //c.Cache[nodename]["mem_write"], c.Cache[nodename]["c6res"])
|
|
}
|
|
}
|