apiserverk8s.io/apiserver/pkg/util/flowcontrol/metrics Index | Files

package metrics

import "k8s.io/apiserver/pkg/util/flowcontrol/metrics"

Index

Functions

func AddDispatch

func AddDispatch(priorityLevel, flowSchema string)

AddDispatch increments the # of dispatched requests for flow control

func AddReject

func AddReject(priorityLevel, flowSchema, reason string)

AddReject increments the # of rejected requests for flow control

func AddRequestsExecuting

func AddRequestsExecuting(priorityLevel, flowSchema string, delta int)

AddRequestsExecuting adds the given delta to the gauge of executing requests of the given flowSchema and priorityLevel

func AddRequestsInQueues

func AddRequestsInQueues(priorityLevel, flowSchema string, delta int)

AddRequestsInQueues adds the given delta to the gauge of the # of requests in the queues of the specified flowSchema and priorityLevel

func GatherAndCompare

func GatherAndCompare(expected string, metricNames ...string) error

GatherAndCompare the given metrics with the given Prometheus syntax expected value

func ObserveExecutionDuration

func ObserveExecutionDuration(priorityLevel, flowSchema string, executionTime time.Duration)

ObserveExecutionDuration observes the execution duration for flow control

func ObserveQueueLength

func ObserveQueueLength(priorityLevel, flowSchema string, length int)

ObserveQueueLength observes the queue length for flow control

func ObserveWaitingDuration

func ObserveWaitingDuration(priorityLevel, flowSchema, execute string, waitTime time.Duration)

ObserveWaitingDuration observes the queue length for flow control

func Register

func Register()

Register all metrics.

func Reset

func Reset()

Reset all metrics to zero

func UpdateSharedConcurrencyLimit

func UpdateSharedConcurrencyLimit(priorityLevel string, limit int)

UpdateSharedConcurrencyLimit updates the value for the concurrency limit in flow control

Source Files

metrics.go

Version
v0.18.17-rc.0
Published
Feb 17, 2021
Platform
js/wasm
Imports
6 packages
Last checked
1 minute ago

Tools for package owners.