Commit 48557a16 authored by Bobby (Babak) Salamat's avatar Bobby (Babak) Salamat

fixup! Add a scheduler cache dumper

parent 4bb57c44
......@@ -37,21 +37,21 @@ type CacheDumper struct {
// DumpAll writes cached nodes and scheduling queue information to the scheduler logs.
func (d *CacheDumper) DumpAll() {
d.DumpNodes()
d.DumpSchedulingQueue()
d.dumpNodes()
d.dumpSchedulingQueue()
}
// DumpNodes writes NodeInfo to the scheduler logs.
func (d *CacheDumper) DumpNodes() {
// dumpNodes writes NodeInfo to the scheduler logs.
func (d *CacheDumper) dumpNodes() {
snapshot := d.cache.Snapshot()
glog.Info("Dump of cached NodeInfo")
for _, info := range snapshot.Nodes {
glog.Info(printNodeInfo(info))
for _, nodeInfo := range snapshot.Nodes {
glog.Info(printNodeInfo(nodeInfo))
}
}
// DumpSchedulingQueue writes pods in the scheduling queue to the scheduler logs.
func (d *CacheDumper) DumpSchedulingQueue() {
// dumpSchedulingQueue writes pods in the scheduling queue to the scheduler logs.
func (d *CacheDumper) dumpSchedulingQueue() {
waitingPods := d.podQueue.WaitingPods()
var podData strings.Builder
for _, p := range waitingPods {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment