From 0e4fc742e459c25209977e09f1ccb81fd69ab562 Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Thu, 14 Nov 2024 20:26:52 -0800 Subject: [PATCH] chore: Convert `karpenter_scheduler_unfinished_work_seconds` to seconds (#1812) --- pkg/controllers/provisioning/scheduling/scheduler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controllers/provisioning/scheduling/scheduler.go b/pkg/controllers/provisioning/scheduling/scheduler.go index 1d7ef740a9..e4cea4d7ac 100644 --- a/pkg/controllers/provisioning/scheduling/scheduler.go +++ b/pkg/controllers/provisioning/scheduling/scheduler.go @@ -213,7 +213,7 @@ func (s *Scheduler) Solve(ctx context.Context, pods []*corev1.Pod) Results { lastLogTime := s.clock.Now() batchSize := len(q.pods) for { - UnfinishedWorkSeconds.Set(float64(s.clock.Since(startTime)), map[string]string{ControllerLabel: injection.GetControllerName(ctx), schedulingIDLabel: string(s.id)}) + UnfinishedWorkSeconds.Set(s.clock.Since(startTime).Seconds(), map[string]string{ControllerLabel: injection.GetControllerName(ctx), schedulingIDLabel: string(s.id)}) QueueDepth.Set(float64(len(q.pods)), map[string]string{ControllerLabel: injection.GetControllerName(ctx), schedulingIDLabel: string(s.id)}) if s.clock.Since(lastLogTime) > time.Minute {