mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 16:29:21 +00:00
Renaming: "Change" -> "Add" for consistency with underlying method
This commit is contained in:
parent
8a1b603209
commit
c7b098ac6c
@ -460,7 +460,7 @@ func (qs *queueSet) removeTimedOutRequestsFromQueueLocked(queue *queue, fsName s
|
|||||||
req.decision.SetLocked(decisionReject)
|
req.decision.SetLocked(decisionReject)
|
||||||
// get index for timed out requests
|
// get index for timed out requests
|
||||||
timeoutIdx = i
|
timeoutIdx = i
|
||||||
metrics.ChangeRequestsInQueues(qs.qCfg.Name, req.fsName, -1)
|
metrics.AddRequestsInQueues(qs.qCfg.Name, req.fsName, -1)
|
||||||
} else {
|
} else {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -505,7 +505,7 @@ func (qs *queueSet) enqueueLocked(request *request) {
|
|||||||
}
|
}
|
||||||
queue.Enqueue(request)
|
queue.Enqueue(request)
|
||||||
qs.totRequestsWaiting++
|
qs.totRequestsWaiting++
|
||||||
metrics.ChangeRequestsInQueues(qs.qCfg.Name, request.fsName, 1)
|
metrics.AddRequestsInQueues(qs.qCfg.Name, request.fsName, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// dispatchAsMuchAsPossibleLocked runs a loop, as long as there
|
// dispatchAsMuchAsPossibleLocked runs a loop, as long as there
|
||||||
@ -537,7 +537,7 @@ func (qs *queueSet) dispatchSansQueueLocked(ctx context.Context, fsName string,
|
|||||||
}
|
}
|
||||||
req.decision.SetLocked(decisionExecute)
|
req.decision.SetLocked(decisionExecute)
|
||||||
qs.totRequestsExecuting++
|
qs.totRequestsExecuting++
|
||||||
metrics.ChangeRequestsExecuting(qs.qCfg.Name, fsName, 1)
|
metrics.AddRequestsExecuting(qs.qCfg.Name, fsName, 1)
|
||||||
if klog.V(5) {
|
if klog.V(5) {
|
||||||
klog.Infof("QS(%s) at r=%s v=%.9fs: immediate dispatch of request %q %#+v %#+v, qs will have %d executing", qs.qCfg.Name, now.Format(nsTimeFmt), qs.virtualTime, fsName, descr1, descr2, qs.totRequestsExecuting)
|
klog.Infof("QS(%s) at r=%s v=%.9fs: immediate dispatch of request %q %#+v %#+v, qs will have %d executing", qs.qCfg.Name, now.Format(nsTimeFmt), qs.virtualTime, fsName, descr1, descr2, qs.totRequestsExecuting)
|
||||||
}
|
}
|
||||||
@ -566,8 +566,8 @@ func (qs *queueSet) dispatchLocked() bool {
|
|||||||
qs.totRequestsWaiting--
|
qs.totRequestsWaiting--
|
||||||
qs.totRequestsExecuting++
|
qs.totRequestsExecuting++
|
||||||
queue.requestsExecuting++
|
queue.requestsExecuting++
|
||||||
metrics.ChangeRequestsInQueues(qs.qCfg.Name, request.fsName, -1)
|
metrics.AddRequestsInQueues(qs.qCfg.Name, request.fsName, -1)
|
||||||
metrics.ChangeRequestsExecuting(qs.qCfg.Name, request.fsName, 1)
|
metrics.AddRequestsExecuting(qs.qCfg.Name, request.fsName, 1)
|
||||||
if klog.V(6) {
|
if klog.V(6) {
|
||||||
klog.Infof("QS(%s) at r=%s v=%.9fs: dispatching request %#+v %#+v from queue %d with virtual start time %.9fs, queue will have %d waiting & %d executing", qs.qCfg.Name, request.startTime.Format(nsTimeFmt), qs.virtualTime, request.descr1, request.descr2, queue.index, queue.virtualStart, len(queue.requests), queue.requestsExecuting)
|
klog.Infof("QS(%s) at r=%s v=%.9fs: dispatching request %#+v %#+v from queue %d with virtual start time %.9fs, queue will have %d waiting & %d executing", qs.qCfg.Name, request.startTime.Format(nsTimeFmt), qs.virtualTime, request.descr1, request.descr2, queue.index, queue.virtualStart, len(queue.requests), queue.requestsExecuting)
|
||||||
}
|
}
|
||||||
@ -595,7 +595,7 @@ func (qs *queueSet) cancelWait(req *request) {
|
|||||||
// remove the request
|
// remove the request
|
||||||
queue.requests = append(queue.requests[:i], queue.requests[i+1:]...)
|
queue.requests = append(queue.requests[:i], queue.requests[i+1:]...)
|
||||||
qs.totRequestsWaiting--
|
qs.totRequestsWaiting--
|
||||||
metrics.ChangeRequestsInQueues(qs.qCfg.Name, req.fsName, -1)
|
metrics.AddRequestsInQueues(qs.qCfg.Name, req.fsName, -1)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -648,7 +648,7 @@ func (qs *queueSet) finishRequestAndDispatchAsMuchAsPossible(req *request) bool
|
|||||||
// callback updates important state in the queueSet
|
// callback updates important state in the queueSet
|
||||||
func (qs *queueSet) finishRequestLocked(r *request) {
|
func (qs *queueSet) finishRequestLocked(r *request) {
|
||||||
qs.totRequestsExecuting--
|
qs.totRequestsExecuting--
|
||||||
metrics.ChangeRequestsExecuting(qs.qCfg.Name, r.fsName, -1)
|
metrics.AddRequestsExecuting(qs.qCfg.Name, r.fsName, -1)
|
||||||
|
|
||||||
if r.queue == nil {
|
if r.queue == nil {
|
||||||
if klog.V(6) {
|
if klog.V(6) {
|
||||||
|
@ -157,13 +157,13 @@ var (
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
// ChangeRequestsInQueues adds the given delta to the gauge of the # of requests in the queues of the specified flowSchema and priorityLevel
|
// AddRequestsInQueues adds the given delta to the gauge of the # of requests in the queues of the specified flowSchema and priorityLevel
|
||||||
func ChangeRequestsInQueues(priorityLevel, flowSchema string, delta int) {
|
func AddRequestsInQueues(priorityLevel, flowSchema string, delta int) {
|
||||||
apiserverCurrentInqueueRequests.WithLabelValues(priorityLevel, flowSchema).Add(float64(delta))
|
apiserverCurrentInqueueRequests.WithLabelValues(priorityLevel, flowSchema).Add(float64(delta))
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChangeRequestsExecuting adds the given delta to the gauge of executing requests of the given flowSchema and priorityLevel
|
// AddRequestsExecuting adds the given delta to the gauge of executing requests of the given flowSchema and priorityLevel
|
||||||
func ChangeRequestsExecuting(priorityLevel, flowSchema string, delta int) {
|
func AddRequestsExecuting(priorityLevel, flowSchema string, delta int) {
|
||||||
apiserverCurrentExecutingRequests.WithLabelValues(priorityLevel, flowSchema).Add(float64(delta))
|
apiserverCurrentExecutingRequests.WithLabelValues(priorityLevel, flowSchema).Add(float64(delta))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user