Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Constants for metric names. SchedulingName = "placement_scheduling" SchedulingSubsystem = "scheduling" SchedulingDurationKey = "scheduling_duration_seconds" BindDurationKey = "bind_duration_seconds" PluginDurationKey = "plugin_duration_seconds" )
Variables ¶
View Source
var ( PluginDuration = k8smetrics.NewHistogramVec(&k8smetrics.HistogramOpts{ Subsystem: SchedulingSubsystem, Name: PluginDurationKey, StabilityLevel: k8smetrics.ALPHA, Help: "How long in seconds a plugin runs for a placement.", Buckets: k8smetrics.ExponentialBuckets(10e-7, 10, 10), }, []string{"name", "plugin_type", "plugin_name"}) )
Metric histograms for tracking various durations.
Functions ¶
This section is empty.
Types ¶
type HistogramMetric ¶
type HistogramMetric interface {
Observe(float64)
}
HistogramMetric represents an interface for counting individual observations.
type ScheduleMetrics ¶
type ScheduleMetrics struct {
// contains filtered or unexported fields
}
ScheduleMetrics holds the metrics and data related to scheduling and binding.
func NewScheduleMetrics ¶
func NewScheduleMetrics(clock clock.Clock) *ScheduleMetrics
NewScheduleMetrics creates a new ScheduleMetrics instance.
func (*ScheduleMetrics) Done ¶
func (m *ScheduleMetrics) Done(key string)
Done is called when a task is completed to record the duration.
func (*ScheduleMetrics) SinceInSeconds ¶
func (m *ScheduleMetrics) SinceInSeconds(start time.Time) float64
SinceInSeconds returns the time duration in seconds since the provided start time.
func (*ScheduleMetrics) StartBind ¶
func (m *ScheduleMetrics) StartBind(key string)
StartBind marks the start time of binding for a given key.
func (*ScheduleMetrics) StartSchedule ¶
func (m *ScheduleMetrics) StartSchedule(key string)
StartSchedule marks the start time of scheduling for a given key.
Click to show internal directories.
Click to hide internal directories.