cmd/rpc/slots: apply -type to printing only
This commit is contained in:
parent
8356f43d60
commit
989ee15a55
|
@ -142,10 +142,6 @@ func watchSlotUpdates(ctx context.Context, node *envv1.RPCNode, highest *sync.Ma
|
||||||
ts := m.Timestamp.Time()
|
ts := m.Timestamp.Time()
|
||||||
delay := time.Since(ts)
|
delay := time.Since(ts)
|
||||||
|
|
||||||
if *flagType != "" && string(m.Type) != *flagType {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
sched.Update(m.Slot)
|
sched.Update(m.Slot)
|
||||||
|
|
||||||
var first time.Time
|
var first time.Time
|
||||||
|
@ -170,6 +166,10 @@ func watchSlotUpdates(ctx context.Context, node *envv1.RPCNode, highest *sync.Ma
|
||||||
prop = -1
|
prop = -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if *flagType != "" && string(m.Type) != *flagType {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
klog.Infof("%s: slot=%d type=%s delay=%dms prop=%dms parent=%d stats=%v leader=%s",
|
klog.Infof("%s: slot=%d type=%s delay=%dms prop=%dms parent=%d stats=%v leader=%s",
|
||||||
node.Name, m.Slot, m.Type, delay.Milliseconds(), prop, m.Parent, m.Stats, sched.Get(m.Slot))
|
node.Name, m.Slot, m.Type, delay.Milliseconds(), prop, m.Parent, m.Stats, sched.Get(m.Slot))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue