Avoid serialization of maps when log level < 10
Change-Id: If264c26ae599602d5b4919301f011c2095d706ee
This commit is contained in:
parent
6c65bed7ce
commit
b62541fe84
@ -67,10 +67,12 @@ func (r *resourceAllocationScorer) score(
|
||||
|
||||
score := r.scorer(requested, allocatable)
|
||||
|
||||
klog.V(10).InfoS("Listing internal info for allocatable resources, requested resources and score", "pod",
|
||||
if klogV := klog.V(10); klogV.Enabled() { // Serializing these maps is costly.
|
||||
klogV.InfoS("Listing internal info for allocatable resources, requested resources and score", "pod",
|
||||
klog.KObj(pod), "node", klog.KObj(node), "resourceAllocationScorer", r.Name,
|
||||
"allocatableResource", allocatable, "requestedResource", requested, "resourceScore", score,
|
||||
)
|
||||
}
|
||||
|
||||
return score, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user