Skip to content

Commit

Permalink
fixing waiting time metric (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
jt-dd authored Oct 9, 2024
1 parent df687b4 commit f1bcebf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/collector/k8s_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ func (c *k8sAPICollector) ComputeMetadata(ctx context.Context, ingestor Metadata
}

func (c *k8sAPICollector) wait(_ context.Context, resourceType string, tags []string) {
c.mu.Lock()
prev := time.Now()
now := c.rl.Take()

waitTime := now.Sub(prev)
c.mu.Lock()
defer c.mu.Unlock()
c.waitTime[resourceType] += waitTime

Expand Down

0 comments on commit f1bcebf

Please sign in to comment.