metrics

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 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) DisableJobStateMetrics added in v0.11.0

func (m *Metrics) DisableJobStateMetrics()

DisableJobStateMetrics stops the jobStateMetrics from being produced. This is necessary because we only produce these metrics when we are leader in order to avoid double counting

func (*Metrics) EnableJobStateMetrics added in v0.11.0

func (m *Metrics) EnableJobStateMetrics()

EnableJobStateMetrics starts the jobStateMetrics

func (*Metrics) JobStateMetricsEnabled added in v0.11.0

func (m *Metrics) JobStateMetricsEnabled() bool

JobStateMetricsEnabled returns true if job state metrics are enabled

func (Metrics) ReportJobLeased added in v0.11.0

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

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

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 schedulerresult.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