Skip to content

Commit

Permalink
node: topology-mgr: code optimization
Browse files Browse the repository at this point in the history
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
  • Loading branch information
swatisehgal committed Feb 15, 2023
1 parent cf21dce commit 8442b45
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/kubelet/cm/topologymanager/topology_manager.go
Expand Up @@ -211,10 +211,9 @@ func (m *manager) RemoveContainer(containerID string) error {
func (m *manager) Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAdmitResult {
klog.InfoS("Topology Admit Handler")
metrics.TopologyManagerAdmissionRequestsTotal.Inc()
pod := attrs.Pod

startTime := time.Now()
podAdmitResult := m.scope.Admit(pod)
podAdmitResult := m.scope.Admit(attrs.Pod)
metrics.TopologyManagerAdmissionDuration.Observe(float64(time.Since(startTime).Milliseconds()))

return podAdmitResult
Expand Down

0 comments on commit 8442b45

Please sign in to comment.