metrics

package
v0.0.0-...-6111fc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BinderSubsystem - subsystem name used by Binder
	BinderSubsystem = "binder"

	DeletePod = "delete"
	PatchPod  = "patch"
	BindPod   = "bind"

	// Below are possible values for the operation label. Each represents a substep of e2e binding:
	// CheckConflictsEvaluation - CheckConflicts evaluation operation label value
	CheckConflictsEvaluation = "check_conflicts_evaluation"

	CheckTopologyEvaluation = "check_topology"

	// ReserveEvaluation - operation label value
	ReserveEvaluation = "reserve_evaluation"

	// UnreserveEvaluation - operation label value
	UnreserveEvaluation = "unreserve_evaluation"

	// PermitEvaluation - operation label value
	PermitEvaluation = "permit_evaluation"

	// PreBindEvaluation - operation label value
	PreBindEvaluation = "prebind_evaluation"

	// BindEvaluation - operation label value
	BindEvaluation = "bind_evaluation"

	// PostBindEvaluation - operation label value
	PostBindEvaluation = "postbind_evaluation"

	// SuccessResult - result label value
	SuccessResult = "success"

	// FailureResult - result label value
	FailureResult = "failure"

	// BindingPhase the phase for binding pods
	BindingPhase = "binding"
)
View Source
const (
	// reject reason
	BindingTimeout = "timeout"

	// pod binding failure reason
	InitializationFailure  = "initialization"
	InternalErrorFailure   = "internal_error"
	CheckTopologyFailure   = "check_topology"
	CheckPreemptionFailure = "check_preemption"
	PreemptionTimeout      = "preemption_timeout"

	// pod binding phase
	CheckTopologyPhase   = "check_topology"
	CheckConflictPhase   = "check_conflict"
	CheckPreemptionPhase = "check_preemption"
)

Variables

View Source
var (
	CacheSize = metrics.NewGaugeVec(
		&metrics.GaugeOpts{
			Subsystem:      BinderSubsystem,
			Name:           "cache_size",
			Help:           "Number of nodes, pods, and assumed (bound) pods in the binder cache.",
			StabilityLevel: metrics.ALPHA,
		}, []string{"type"})
)

Functions

func AddMetrics

func AddMetrics(r ...metrics.Registerable)

func BinderGoroutinesDec

func BinderGoroutinesDec(podProperty *api.PodProperty, work string)

BinderGoroutinesDec Invoke Dec method podLabels contains basic object property labels

func BinderGoroutinesInc

func BinderGoroutinesInc(podProperty *api.PodProperty, work string)

BinderGoroutinesInc Invoke Inc method podLabels contains basic object property labels

func BinderQueueIncomingPodsAdd

func BinderQueueIncomingPodsAdd(podProperty *api.PodProperty, queue, event string, value float64)

BinderQueueIncomingPodsAdd Invoke Add method podLabels contains basic object property labels

func BinderQueueIncomingPodsInc

func BinderQueueIncomingPodsInc(podProperty *api.PodProperty, queue, event string)

BinderQueueIncomingPodsInc Invoke Inc method podLabels contains basic object property labels

func BinderUnitE2ELatencyObserve

func BinderUnitE2ELatencyObserve(unitProperty api.UnitProperty, duration float64)

func BindingCycleLatencyObserve

func BindingCycleLatencyObserve(podProperty *api.PodProperty, attempts string, duration float64)

BindingCycleLatencyObserve Invoke Observe method podLabels contains basic object property labels

func BindingFailuresInc

func BindingFailuresInc(podProperty *api.PodProperty)

BindingFailuresInc Invoke Inc method podLabels contains basic object property labels

func BindingStageDurationObserve

func BindingStageDurationObserve(podProperty *api.PodProperty, operation, plugin, status string, duration float64)

BindingStageDurationObserve Invoke Observe method podLabels contains basic object property labels

func CheckConflictFailuresInc

func CheckConflictFailuresInc(podProperty *api.PodProperty, reason string)

CheckConflictFailuresInc Invoke Inc method podLabels contains basic object property labels

func E2eBinderLatencyQuantileObserve

func E2eBinderLatencyQuantileObserve(podProperty *api.PodProperty, duration float64)

E2eBinderLatencyQuantileObserve Invoke Observe method podLabels contains basic object property labels

func IncPreemptingAttempts

func IncPreemptingAttempts(podProperty *api.PodProperty, success bool)

func ObserveBindingStageDuration

func ObserveBindingStageDuration(podProperty *api.PodProperty, operation, plugin, status string, duration float64)

func ObserveMovementUpdateAttempts

func ObserveMovementUpdateAttempts(rescheduleAlgorithm, updateResult, suggestResult string)

func ObservePodBinderE2ELatency

func ObservePodBinderE2ELatency(podInfo *api.QueuedPodInfo)

func ObservePodGodelE2E

func ObservePodGodelE2E(podInfo *api.QueuedPodInfo)

func ObserveRejectUnit

func ObserveRejectUnit(unit *api.QueuedUnitInfo, stage string)

func ObserveUnitBindingAttempts

func ObserveUnitBindingAttempts(unit *api.QueuedUnitInfo, successfulPods, failedPods int)

func PendingPodsAdd

func PendingPodsAdd(podProperty *api.PodProperty, queue string, value float64)

PendingPodsAdd Invoke Add method podLabels contains basic object property labels

func PendingUnitsDec

func PendingUnitsDec(unitProperty api.UnitProperty, queue string)

PendingUnitsDec Invoke Dec method basicLabels contains basic object property labels

func PendingUnitsInc

func PendingUnitsInc(unitProperty api.UnitProperty, queue string)

PendingUnitsInc Invoke Inc method basicLabels contains basic object property labels

func PodBindingAttemptsAdd

func PodBindingAttemptsAdd(podProperty *api.PodProperty, result string, count float64)

func PodBindingAttemptsInc

func PodBindingAttemptsInc(podProperty *api.PodProperty, result string)

PodBindingAttemptsInc Invoke Inc method podLabels contains basic object property labels

func PodBindingFailureInc

func PodBindingFailureInc(property *api.PodProperty, reason string)

func PodBindingPhaseDurationObserve

func PodBindingPhaseDurationObserve(podProperty *api.PodProperty, phase, result string, duration float64)

func PodE2EBinderLatencyObserve

func PodE2EBinderLatencyObserve(podProperty *api.PodProperty, duration float64)

PodE2EBinderLatencyObserve Invoke Observe method podLabels contains basic object property labels

func PodGroupE2ELatencyObserve

func PodGroupE2ELatencyObserve(labels metrics.Labels, duration float64)

func PodOperatingAttemptsInc

func PodOperatingAttemptsInc(podProperty *api.PodProperty, result, operation string)

PodOperatingAttemptsInc Invoke Inc method podLabels contains basic object property labels

func PodOperatingLatencyObserve

func PodOperatingLatencyObserve(podProperty *api.PodProperty, result, operation string, duration float64)

PodOperatingLatencyObserve Invoke Observe method podLabels contains basic object property labels

func PodPendingLatencyObserve

func PodPendingLatencyObserve(podProperty *api.PodProperty, queue string, duration float64)

PodPendingLatencyObserve Invoke Observe method podLabels contains basic object property labels

func PreemptVictimPodsCycleLatencyObserve

func PreemptVictimPodsCycleLatencyObserve(podProperty *api.PodProperty, result string, duration float64)

PreemptVictimPodsCycleLatencyObserve Invoke Observe method podLabels contains basic object property labels

func PreemptingAttemptsInc

func PreemptingAttemptsInc(podProperty *api.PodProperty, result string)

PreemptingAttemptsInc Invoke Inc method podLabels contains basic object property labels

func Register

func Register()

Register all metrics.

func RejectPodInc

func RejectPodInc(podProperty *api.PodProperty, reason string)

func RejectUnitObserve

func RejectUnitObserve(unitProperty api.UnitProperty, minMember float64, stage string)

func SinceInSeconds

func SinceInSeconds(start time.Time) float64

SinceInSeconds gets the time since the specified start in seconds.

Types

type PendingUnitsRecorder

type PendingUnitsRecorder struct {
	// contains filtered or unexported fields
}

PendingUnitsRecorder is an implementation of MetricRecorder

func NewPendingUnitsRecorder

func NewPendingUnitsRecorder(queue string) *PendingUnitsRecorder

func (*PendingUnitsRecorder) AddingLatencyInSeconds

func (r *PendingUnitsRecorder) AddingLatencyInSeconds(_ interface{}, _ float64)

TODO AddingLatencyInSeconds for binder to be implemented later

func (*PendingUnitsRecorder) Clear

func (r *PendingUnitsRecorder) Clear()

Clear set a metric counter to 0, in an atomic way

func (*PendingUnitsRecorder) Dec

func (r *PendingUnitsRecorder) Dec(obj interface{})

Dec decreases a metric counter by 1, in an atomic way

func (*PendingUnitsRecorder) Inc

func (r *PendingUnitsRecorder) Inc(obj interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL