{"modulePath":"github.com/cloudfoundry/executor","version":"v0.0.0-20260626172623-1f62bb75b686","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package containermetrics\n\n## Types\n\n```go\ntype CPUInfo struct {\n\tTimeSpentInCPU                      time.Duration\n\tTimeOfSample                        time.Time\n\tAbsoluteCPUEntitlementInNanoseconds uint64\n}\n```\n\n```go\ntype CPUSpikeReporter struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCPUSpikeReporter(metronClient loggingclient.IngressClient) *CPUSpikeReporter\n```\n\n```go\nfunc (reporter *CPUSpikeReporter) Report(logger lager.Logger, containers []executor.Container, metrics map[string]executor.Metrics, timeStamp time.Time) error\n```\n\n```go\ntype CachedContainerMetrics struct {\n\tMetricGUID       string  `json:\"metric_guid\"`\n\tCPUUsageFraction float64 `json:\"cpu_usage_fraction\"`\n\tDiskUsageBytes   uint64  `json:\"disk_usage_bytes\"`\n\tDiskQuotaBytes   uint64  `json:\"disk_quota_bytes\"`\n\tMemoryUsageBytes uint64  `json:\"memory_usage_bytes\"`\n\tMemoryQuotaBytes uint64  `json:\"memory_quota_bytes\"`\n\tRxBytes          *uint64 `json:\"rx_bytes,omitempty\"`\n\tTxBytes          *uint64 `json:\"tx_bytes,omitempty\"`\n}\n```\n\n```go\ntype DefaultMetricsProcessor struct{}\n```\n\n```go\nfunc (p *DefaultMetricsProcessor) ProcessAndSend(\n\tlogger lager.Logger,\n\tmetronClient loggingclient.IngressClient,\n\tmetricsConfig executor.MetricsConfig,\n\tcontainerMetrics executor.ContainerMetrics,\n\tpreviousInfo *CPUInfo,\n\tnow time.Time,\n) (CPUInfo, *CachedContainerMetrics)\n```\n\n```go\ntype MetricsProcessor interface {\n\tProcessAndSend(logger lager.Logger, metronClient loggingclient.IngressClient, metricsConfig executor.MetricsConfig, containerMetrics executor.ContainerMetrics, previousInfo *CPUInfo, now time.Time) (CPUInfo, *CachedContainerMetrics)\n}\n```\n\n```go\ntype MetricsReporter interface {\n\tReport(logger lager.Logger, containers []executor.Container, metrics map[string]executor.Metrics, timeStamp time.Time) error\n}\n```\n\n```go\ntype ReportersRunner struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewReportersRunner(logger lager.Logger,\n\tinterval time.Duration,\n\tclock clock.Clock,\n\texecutorClient executor.Client,\n\tmetricsReporters ...MetricsReporter,\n) *ReportersRunner\n```\n\n```go\nfunc (reporterRunner *ReportersRunner) Run(signals \u003c-chan os.Signal, ready chan\u003c- struct{}) error\n```\n\n```go\ntype StatsReporter struct {\n\tCPUInfos map[string]*CPUInfo\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewStatsReporter(metronClient loggingclient.IngressClient, enableContainerProxy bool, proxyMemoryAllocation float64, metricsCache *atomic.Value) *StatsReporter\n```\n\n```go\nfunc NewStatsReporterWithProcessor(metronClient loggingclient.IngressClient, enableContainerProxy bool, proxyMemoryAllocation float64, metricsCache *atomic.Value, processor MetricsProcessor) *StatsReporter\n```\n\n```go\nfunc (reporter *StatsReporter) Metrics() map[string]*CachedContainerMetrics\n```\n\n```go\nfunc (reporter *StatsReporter) Report(logger lager.Logger, containers []executor.Container, metrics map[string]executor.Metrics, timeStamp time.Time) error\n```\n\n","path":"github.com/cloudfoundry/executor/containermetrics","name":"containermetrics","synopsis":"","isRedistributable":true}
