containermetrics

package
v0.0.0-...-a447769 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 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 CPUSpikeReporter

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

func NewCPUSpikeReporter

func NewCPUSpikeReporter(metronClient loggingclient.IngressClient) *CPUSpikeReporter

func (*CPUSpikeReporter) Report

func (reporter *CPUSpikeReporter) Report(logger lager.Logger, containers []executor.Container, metrics map[string]executor.Metrics, timeStamp time.Time) error

type CachedContainerMetrics

type CachedContainerMetrics struct {
	MetricGUID       string  `json:"metric_guid"`
	CPUUsageFraction float64 `json:"cpu_usage_fraction"`
	DiskUsageBytes   uint64  `json:"disk_usage_bytes"`
	DiskQuotaBytes   uint64  `json:"disk_quota_bytes"`
	MemoryUsageBytes uint64  `json:"memory_usage_bytes"`
	MemoryQuotaBytes uint64  `json:"memory_quota_bytes"`
	RxBytes          *uint64 `json:"rx_bytes,omitempty"`
	TxBytes          *uint64 `json:"tx_bytes,omitempty"`
}

type MetricsReporter

type MetricsReporter interface {
	Report(logger lager.Logger, containers []executor.Container, metrics map[string]executor.Metrics, timeStamp time.Time) error
}

type ReportersRunner

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

func NewReportersRunner

func NewReportersRunner(logger lager.Logger,
	interval time.Duration,
	clock clock.Clock,
	executorClient executor.Client,
	metricsReporters ...MetricsReporter,
) *ReportersRunner

func (*ReportersRunner) Run

func (reporterRunner *ReportersRunner) Run(signals <-chan os.Signal, ready chan<- struct{}) error

type StatsReporter

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

func NewStatsReporter

func NewStatsReporter(metronClient loggingclient.IngressClient, enableContainerProxy bool, proxyMemoryAllocation float64, metricsCache *atomic.Value) *StatsReporter

func (*StatsReporter) Metrics

func (reporter *StatsReporter) Metrics() map[string]*CachedContainerMetrics

func (*StatsReporter) Report

func (reporter *StatsReporter) Report(logger lager.Logger, containers []executor.Container, metrics map[string]executor.Metrics, timeStamp time.Time) error

Jump to

Keyboard shortcuts

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