apf: add metric to track dispatch with no accommodation
Kubernetes-commit: 30c0485e0cba3ec6b19e092e7e78059b3fd4f18c
This commit is contained in:
parent
b9896796dd
commit
44e5395e0e
|
@ -800,6 +800,7 @@ func (qs *queueSet) findDispatchQueueLocked() (*queue, *request) {
|
|||
klogV.Infof("QS(%s): request %v %v seats %d cannot be dispatched from queue %d, waiting for currently executing requests to complete, %d requests are occupying %d seats and the limit is %d",
|
||||
qs.qCfg.Name, oldestReqFromMinQueue.descr1, oldestReqFromMinQueue.descr2, oldestReqFromMinQueue.MaxSeats(), minQueue.index, qs.totRequestsExecuting, qs.totSeatsInUse, qs.dCfg.ConcurrencyLimit)
|
||||
}
|
||||
metrics.AddDispatchWithNoAccommodation(qs.qCfg.Name, oldestReqFromMinQueue.fsName)
|
||||
return nil, nil
|
||||
}
|
||||
oldestReqFromMinQueue.removeFromQueueLocked()
|
||||
|
|
|
@ -324,6 +324,16 @@ var (
|
|||
},
|
||||
[]string{priorityLevel, flowSchema},
|
||||
)
|
||||
apiserverDispatchWithNoAccommodation = compbasemetrics.NewCounterVec(
|
||||
&compbasemetrics.CounterOpts{
|
||||
Namespace: namespace,
|
||||
Subsystem: subsystem,
|
||||
Name: "request_dispatch_no_accommodation_total",
|
||||
Help: "Number of times a dispatch attempt resulted in a non accommodation due to lack of available seats",
|
||||
StabilityLevel: compbasemetrics.ALPHA,
|
||||
},
|
||||
[]string{priorityLevel, flowSchema},
|
||||
)
|
||||
|
||||
metrics = Registerables{
|
||||
apiserverRejectedRequestsTotal,
|
||||
|
@ -343,6 +353,7 @@ var (
|
|||
watchCountSamples,
|
||||
apiserverEpochAdvances,
|
||||
apiserverWorkEstimatedSeats,
|
||||
apiserverDispatchWithNoAccommodation,
|
||||
}.
|
||||
Append(PriorityLevelExecutionSeatsObserverGenerator.metrics()...).
|
||||
Append(PriorityLevelConcurrencyObserverPairGenerator.metrics()...).
|
||||
|
@ -428,3 +439,9 @@ func AddEpochAdvance(ctx context.Context, priorityLevel string, success bool) {
|
|||
func ObserveWorkEstimatedSeats(priorityLevel, flowSchema string, seats int) {
|
||||
apiserverWorkEstimatedSeats.WithLabelValues(priorityLevel, flowSchema).Observe(float64(seats))
|
||||
}
|
||||
|
||||
// AddDispatchWithNoAccommodation keeps track of number of times dispatch attempt results
|
||||
// in a non accommodation due to lack of available seats.
|
||||
func AddDispatchWithNoAccommodation(priorityLevel, flowSchema string) {
|
||||
apiserverDispatchWithNoAccommodation.WithLabelValues(priorityLevel, flowSchema).Inc()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue