Back to godoc.org

Package metrics

v0.0.0-...-67dc25f
Latest Go to latest

The highest tagged major version is .

Published: Feb 3, 2020 | License: Apache-2.0 | Module: github.com/cloudera/yunikorn-core

Index

Constants

const (
	// all metrics should be declared under this namespace
	Namespace = "yunikorn"
	// SchedulerSubsystem - subsystem name used by scheduler
	SchedulerSubsystem = "scheduler"
	// replacement of invalid byte for prometheus metric names
	MetricNameInvalidByteReplacement = '_'
)

func Reset

func Reset()

Reset resets metrics

func SinceInMicroseconds

func SinceInMicroseconds(start time.Time) float64

SinceInMicroseconds gets the time since the specified start in microseconds.

func SinceInSeconds

func SinceInSeconds(start time.Time) float64

SinceInSeconds gets the time since the specified start in seconds.

type CoreQueueMetrics

type CoreQueueMetrics interface {
	IncApplicationsAccepted()
	IncApplicationsRejected()
	IncApplicationsCompleted()
	AddQueueUsedResourceMetrics(resourceName string, value float64)
	SetQueueUsedResourceMetrics(resourceName string, value float64)
}

func GetQueueMetrics

func GetQueueMetrics(name string) CoreQueueMetrics

type CoreSchedulerMetrics

type CoreSchedulerMetrics interface {
	// Metrics Ops related to ScheduledAllocationSuccesses
	IncAllocatedContainer()
	AddAllocatedContainers(value int)

	// Metrics Ops related to ScheduledAllocationFailures
	IncRejectedContainer()
	AddRejectedContainers(value int)

	// Metrics Ops related to ScheduledAllocationErrors
	IncSchedulingError()
	AddSchedulingErrors(value int)

	// Metrics Ops related to released allocations
	IncReleasedContainer()
	AddReleasedContainers(value int)

	// Metrics Ops related to TotalApplicationsAdded
	IncTotalApplicationsAdded()
	AddTotalApplicationsAdded(value int)

	// Metrics Ops related to TotalApplicationsRejected
	IncTotalApplicationsRejected()
	AddTotalApplicationsRejected(value int)

	// Metrics Ops related to TotalApplicationsRunning
	IncTotalApplicationsRunning()
	AddTotalApplicationsRunning(value int)
	DecTotalApplicationsRunning()
	SubTotalApplicationsRunning(value int)
	SetTotalApplicationsRunning(value int)

	// Metrics Ops related to TotalApplicationsCompleted
	IncTotalApplicationsCompleted()
	AddTotalApplicationsCompleted(value int)
	DecTotalApplicationsCompleted()
	SubTotalApplicationsCompleted(value int)
	SetTotalApplicationsCompleted(value int)

	// Metrics Ops related to ActiveNodes
	IncActiveNodes()
	AddActiveNodes(value int)
	DecActiveNodes()
	SubActiveNodes(value int)
	SetActiveNodes(value int)

	// Metrics Ops related to failedNodes
	IncFailedNodes()
	AddFailedNodes(value int)
	DecFailedNodes()
	SubFailedNodes(value int)
	SetFailedNodes(value int)
	SetNodeResourceUsage(resourceName string, rangeIdx int, value float64)

	//latency change
	ObserveSchedulingLatency(start time.Time)
	ObserveNodeSortingLatency(start time.Time)
}

Declare all core metrics ops in this interface

func GetSchedulerMetrics

func GetSchedulerMetrics() CoreSchedulerMetrics

type Metrics

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

type QueueMetrics

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

func (*QueueMetrics) AddQueueUsedResourceMetrics

func (m *QueueMetrics) AddQueueUsedResourceMetrics(resourceName string, value float64)

func (*QueueMetrics) IncApplicationsAccepted

func (m *QueueMetrics) IncApplicationsAccepted()

func (*QueueMetrics) IncApplicationsCompleted

func (m *QueueMetrics) IncApplicationsCompleted()

func (*QueueMetrics) IncApplicationsRejected

func (m *QueueMetrics) IncApplicationsRejected()

func (*QueueMetrics) SetQueueUsedResourceMetrics

func (m *QueueMetrics) SetQueueUsedResourceMetrics(resourceName string, value float64)

type SchedulerMetrics

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

All core metrics variables to be declared in this struct

func (*SchedulerMetrics) AddActiveNodes

func (m *SchedulerMetrics) AddActiveNodes(value int)

func (*SchedulerMetrics) AddAllocatedContainers

func (m *SchedulerMetrics) AddAllocatedContainers(value int)

func (*SchedulerMetrics) AddFailedNodes

func (m *SchedulerMetrics) AddFailedNodes(value int)

func (*SchedulerMetrics) AddRejectedContainers

func (m *SchedulerMetrics) AddRejectedContainers(value int)

func (*SchedulerMetrics) AddReleasedContainers

func (m *SchedulerMetrics) AddReleasedContainers(value int)

func (*SchedulerMetrics) AddSchedulingErrors

func (m *SchedulerMetrics) AddSchedulingErrors(value int)

func (*SchedulerMetrics) AddTotalApplicationsAdded

func (m *SchedulerMetrics) AddTotalApplicationsAdded(value int)

func (*SchedulerMetrics) AddTotalApplicationsCompleted

func (m *SchedulerMetrics) AddTotalApplicationsCompleted(value int)

func (*SchedulerMetrics) AddTotalApplicationsRejected

func (m *SchedulerMetrics) AddTotalApplicationsRejected(value int)

func (*SchedulerMetrics) AddTotalApplicationsRunning

func (m *SchedulerMetrics) AddTotalApplicationsRunning(value int)

func (*SchedulerMetrics) DecActiveNodes

func (m *SchedulerMetrics) DecActiveNodes()

func (*SchedulerMetrics) DecFailedNodes

func (m *SchedulerMetrics) DecFailedNodes()

func (*SchedulerMetrics) DecTotalApplicationsCompleted

func (m *SchedulerMetrics) DecTotalApplicationsCompleted()

func (*SchedulerMetrics) DecTotalApplicationsRunning

func (m *SchedulerMetrics) DecTotalApplicationsRunning()

func (*SchedulerMetrics) IncActiveNodes

func (m *SchedulerMetrics) IncActiveNodes()

Metrics Ops related to ActiveNodes

func (*SchedulerMetrics) IncAllocatedContainer

func (m *SchedulerMetrics) IncAllocatedContainer()

Define and implement all the metrics ops for Prometheus. Metrics Ops related to allocationScheduleSuccesses

func (*SchedulerMetrics) IncFailedNodes

func (m *SchedulerMetrics) IncFailedNodes()

Metrics Ops related to failedNodes

func (*SchedulerMetrics) IncRejectedContainer

func (m *SchedulerMetrics) IncRejectedContainer()

Metrics Ops related to allocationScheduleFailures

func (*SchedulerMetrics) IncReleasedContainer

func (m *SchedulerMetrics) IncReleasedContainer()

func (*SchedulerMetrics) IncSchedulingError

func (m *SchedulerMetrics) IncSchedulingError()

Metrics Ops related to allocationScheduleErrors

func (*SchedulerMetrics) IncTotalApplicationsAdded

func (m *SchedulerMetrics) IncTotalApplicationsAdded()

Metrics Ops related to totalApplicationsAdded

func (*SchedulerMetrics) IncTotalApplicationsCompleted

func (m *SchedulerMetrics) IncTotalApplicationsCompleted()

Metrics Ops related to totalApplicationsCompleted

func (*SchedulerMetrics) IncTotalApplicationsRejected

func (m *SchedulerMetrics) IncTotalApplicationsRejected()

Metrics Ops related to totalApplicationsRejected

func (*SchedulerMetrics) IncTotalApplicationsRunning

func (m *SchedulerMetrics) IncTotalApplicationsRunning()

Metrics Ops related to totalApplicationsRunning

func (*SchedulerMetrics) ObserveNodeSortingLatency

func (m *SchedulerMetrics) ObserveNodeSortingLatency(start time.Time)

func (*SchedulerMetrics) ObserveSchedulingLatency

func (m *SchedulerMetrics) ObserveSchedulingLatency(start time.Time)

func (*SchedulerMetrics) SetActiveNodes

func (m *SchedulerMetrics) SetActiveNodes(value int)

func (*SchedulerMetrics) SetFailedNodes

func (m *SchedulerMetrics) SetFailedNodes(value int)

func (*SchedulerMetrics) SetNodeResourceUsage

func (m *SchedulerMetrics) SetNodeResourceUsage(resourceName string, rangeIdx int, value float64)

func (*SchedulerMetrics) SetTotalApplicationsCompleted

func (m *SchedulerMetrics) SetTotalApplicationsCompleted(value int)

func (*SchedulerMetrics) SetTotalApplicationsRunning

func (m *SchedulerMetrics) SetTotalApplicationsRunning(value int)

func (*SchedulerMetrics) SubActiveNodes

func (m *SchedulerMetrics) SubActiveNodes(value int)

func (*SchedulerMetrics) SubFailedNodes

func (m *SchedulerMetrics) SubFailedNodes(value int)

func (*SchedulerMetrics) SubTotalApplicationsCompleted

func (m *SchedulerMetrics) SubTotalApplicationsCompleted(value int)

func (*SchedulerMetrics) SubTotalApplicationsRunning

func (m *SchedulerMetrics) SubTotalApplicationsRunning(value int)

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier