metrics

package
v0.15.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

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

Metrics is the top level scheduler metrics.

func New

func New(errorRegexes []string, trackedResourceNames []v1.ResourceName, jobStateMetricsResetInterval time.Duration) (*Metrics, error)

func (*Metrics) Collect

func (m *Metrics) Collect(ch chan<- prometheus.Metric)

Collect is necessary to implement the prometheus.Collector interface

func (*Metrics) Describe

func (m *Metrics) Describe(ch chan<- *prometheus.Desc)

Describe is necessary to implement the prometheus.Collector interface

func (*Metrics) DisableLeaderMetrics added in v0.12.1

func (m *Metrics) DisableLeaderMetrics()

DisableLeaderMetrics stops leader metrics from being produced. This is necessary because we only produce some metrics when we are leader in order to avoid double counting

func (*Metrics) EnableLeaderMetrics added in v0.12.1

func (m *Metrics) EnableLeaderMetrics()

EnableLeaderMetrics starts the job state and cycle metrics produced when scheduler is the leader

func (*Metrics) LeaderMetricsEnabled added in v0.12.1

func (m *Metrics) LeaderMetricsEnabled() bool

LeaderMetricsEnabled returns true if leader metrics are enabled

func (Metrics) ReportJobLeased added in v0.11.0

func (m Metrics) ReportJobLeased(job *jobdb.Job)

ReportJobLeased reports the job as being leased. This has to be reported separately because the state transition logic does work for job leased!

func (Metrics) ReportJobPreempted added in v0.12.1

func (m Metrics) ReportJobPreempted(job *jobdb.Job)

ReportJobPreempted reports the job as being preempted. This has to be reported separately because the state transition logic does work for job preempted!

func (Metrics) ReportReconcileCycleTime added in v0.11.0

func (m Metrics) ReportReconcileCycleTime(cycleTime time.Duration)

func (Metrics) ReportScheduleCycleTime added in v0.11.0

func (m Metrics) ReportScheduleCycleTime(cycleTime time.Duration)

func (Metrics) ReportSchedulerResult added in v0.11.0

func (m Metrics) ReportSchedulerResult(result scheduling.SchedulerResult)

func (Metrics) ReportStateTransitions added in v0.11.0

func (m Metrics) ReportStateTransitions(
	jsts []jobdb.JobStateTransitions,
	jobRunErrorsByRunId map[string]*armadaevents.Error,
)

Jump to

Keyboard shortcuts

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