metrics

package
v0.0.0-...-1a72938 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryLock

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

func (*InMemoryLock) LockWithExpire

func (i *InMemoryLock) LockWithExpire(value string, expire time.Duration)

func (*InMemoryLock) Release

func (i *InMemoryLock) Release(value string)

type Lock

type Lock interface {
	LockWithExpire(value string, expire time.Duration)
	Release(value string)
}

func NewInMemoryLock

func NewInMemoryLock() Lock

type MetricIndex

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

func (*MetricIndex) Clean

func (m *MetricIndex) Clean(ctx context.Context, run *v1alpha1.RunDimensions)

func (*MetricIndex) GetAllMetricNamesFromMonitor

func (m *MetricIndex) GetAllMetricNamesFromMonitor(resource string, monitor string) []string

func (*MetricIndex) IsRegistered

func (m *MetricIndex) IsRegistered(runMetric RunMetric) (bool, bool, error)

IsRegistered returns two booleans: if it's registered, and if it's modified

func (*MetricIndex) Record

func (m *MetricIndex) Record(ctx context.Context, run *v1alpha1.RunDimensions, metricType string)

func (*MetricIndex) RegisterRunMetric

func (m *MetricIndex) RegisterRunMetric(ctx context.Context, runMetric RunMetric) error

func (*MetricIndex) UnregisterAllMetricsMonitor

func (m *MetricIndex) UnregisterAllMetricsMonitor(resource string, monitor string) error

func (*MetricIndex) UnregisterRunMetric

func (m *MetricIndex) UnregisterRunMetric(runMetric RunMetric) error

func (*MetricIndex) UnregisterRunMetricByName

func (m *MetricIndex) UnregisterRunMetricByName(runMetricName string) error

type MetricManager

type MetricManager struct {
	Index *MetricIndex
	// contains filtered or unexported fields
}

func NewManager

func NewManager(external view.Meter) *MetricManager

func (*MetricManager) GetIndex

func (m *MetricManager) GetIndex() *MetricIndex

func (*MetricManager) RecordPipelineRunDone

func (m *MetricManager) RecordPipelineRunDone(ctx context.Context, pipelineRun *pipelinev1beta1.PipelineRun) error

func (*MetricManager) RecordPipelineRunRunning

func (m *MetricManager) RecordPipelineRunRunning(ctx context.Context, pipelineRun *pipelinev1beta1.PipelineRun) error

func (*MetricManager) RecordTaskRunDone

func (m *MetricManager) RecordTaskRunDone(ctx context.Context, taskRun *pipelinev1beta1.TaskRun) error

func (*MetricManager) RecordTaskRunRunning

func (m *MetricManager) RecordTaskRunRunning(ctx context.Context, taskRun *pipelinev1beta1.TaskRun) error

type RunMetric

type RunMetric interface {
	MonitorId() string
	MetricName() string
	Metric() *monitoringv1alpha1.Metric
	View() *view.View
	Record(ctx context.Context, recorder stats.Recorder, run *v1alpha1.RunDimensions)
	Clean(ctx context.Context, recorder stats.Recorder, run *v1alpha1.RunDimensions)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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