Documentation ¶
Index ¶
- Variables
- type Aggregator
- type ContainerMetricFilter
- type MetricData
- type MetricStore
- func (c *MetricStore) AggregateCoreMetric(cpuset machine.CPUSet, metricName string, agg Aggregator) MetricData
- func (c *MetricStore) AggregatePodMetric(podList []*v1.Pod, metricName string, agg Aggregator, ...) MetricData
- func (c *MetricStore) AggregatePodNumaMetric(podList []*v1.Pod, numa int, metricName string, agg Aggregator, ...) MetricData
- func (c *MetricStore) GCPodsMetric(livingPodUIDSet map[string]bool)
- func (c *MetricStore) GetCPUMetric(coreID int, metricName string) (MetricData, error)
- func (c *MetricStore) GetCgroupMetric(cgroupPath, metricName string) (MetricData, error)
- func (c *MetricStore) GetCgroupNumaMetric(cgroupPath string, numaNode int, metricName string) (MetricData, error)
- func (c *MetricStore) GetContainerMetric(podUID, containerName, metricName string) (MetricData, error)
- func (c *MetricStore) GetContainerNumaMetric(podUID, containerName string, numaID int, metricName string) (MetricData, error)
- func (c *MetricStore) GetContainerNumaMetrics(podUID, containerName, metricName string) (map[int]MetricData, error)
- func (c *MetricStore) GetDeviceMetric(deviceName string, metricName string) (MetricData, error)
- func (c *MetricStore) GetNetworkMetric(networkName string, metricName string) (MetricData, error)
- func (c *MetricStore) GetNodeMetric(metricName string) (MetricData, error)
- func (c *MetricStore) GetNumaMetric(numaID int, metricName string) (MetricData, error)
- func (c *MetricStore) GetPodVolumeMetric(podUID, volumeName, metricName string) (MetricData, error)
- func (c *MetricStore) SetCPUMetric(cpuID int, metricName string, data MetricData)
- func (c *MetricStore) SetCgroupMetric(cgroupPath, metricName string, data MetricData)
- func (c *MetricStore) SetCgroupNumaMetric(cgroupPath string, numaNode int, metricName string, data MetricData)
- func (c *MetricStore) SetContainerMetric(podUID, containerName, metricName string, data MetricData)
- func (c *MetricStore) SetContainerNumaMetric(podUID, containerName string, numaID int, metricName string, data MetricData)
- func (c *MetricStore) SetDeviceMetric(deviceName string, metricName string, data MetricData)
- func (c *MetricStore) SetNetworkMetric(networkName string, metricName string, data MetricData)
- func (c *MetricStore) SetNodeMetric(metricName string, data MetricData)
- func (c *MetricStore) SetNumaMetric(numaID int, metricName string, data MetricData)
- func (c *MetricStore) SetPodVolumeMetric(podUID, volumeName, metricName string, data MetricData)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶ added in v0.2.0
type Aggregator string
const ( AggregatorSum Aggregator = "sum" AggregatorAvg Aggregator = "avg" )
type ContainerMetricFilter ¶ added in v0.2.0
ContainerMetricFilter is used to filter out unnecessary metrics if this function returns false
type MetricData ¶ added in v0.3.0
type MetricData struct { Value float64 // Time may have different meanings in different scenarios // - for single metric: it represents the exact collecting time // - for aggregated metric: it represents the newest time among all metric items Time *time.Time }
MetricData represents the standard response data for metric getter functions
type MetricStore ¶
type MetricStore struct {
// contains filtered or unexported fields
}
MetricStore stores those metric data. Including: 1. raw data collected from agent.MetricsFetcher. 2. data calculated based on raw data.
func NewMetricStore ¶ added in v0.3.0
func NewMetricStore() *MetricStore
func (*MetricStore) AggregateCoreMetric ¶ added in v0.2.0
func (c *MetricStore) AggregateCoreMetric(cpuset machine.CPUSet, metricName string, agg Aggregator) MetricData
AggregateCoreMetric handles metric for all cores
func (*MetricStore) AggregatePodMetric ¶ added in v0.2.0
func (c *MetricStore) AggregatePodMetric(podList []*v1.Pod, metricName string, agg Aggregator, filter ContainerMetricFilter) MetricData
AggregatePodMetric handles metric for all pods
func (*MetricStore) AggregatePodNumaMetric ¶ added in v0.2.0
func (c *MetricStore) AggregatePodNumaMetric(podList []*v1.Pod, numa int, metricName string, agg Aggregator, filter ContainerMetricFilter) MetricData
AggregatePodNumaMetric handles numa-level metric for all pods
func (*MetricStore) GCPodsMetric ¶
func (c *MetricStore) GCPodsMetric(livingPodUIDSet map[string]bool)
func (*MetricStore) GetCPUMetric ¶
func (c *MetricStore) GetCPUMetric(coreID int, metricName string) (MetricData, error)
func (*MetricStore) GetCgroupMetric ¶ added in v0.3.0
func (c *MetricStore) GetCgroupMetric(cgroupPath, metricName string) (MetricData, error)
func (*MetricStore) GetCgroupNumaMetric ¶ added in v0.3.0
func (c *MetricStore) GetCgroupNumaMetric(cgroupPath string, numaNode int, metricName string) (MetricData, error)
func (*MetricStore) GetContainerMetric ¶
func (c *MetricStore) GetContainerMetric(podUID, containerName, metricName string) (MetricData, error)
func (*MetricStore) GetContainerNumaMetric ¶
func (c *MetricStore) GetContainerNumaMetric(podUID, containerName string, numaID int, metricName string) (MetricData, error)
func (*MetricStore) GetContainerNumaMetrics ¶ added in v0.5.12
func (c *MetricStore) GetContainerNumaMetrics(podUID, containerName, metricName string) (map[int]MetricData, error)
func (*MetricStore) GetDeviceMetric ¶
func (c *MetricStore) GetDeviceMetric(deviceName string, metricName string) (MetricData, error)
func (*MetricStore) GetNetworkMetric ¶ added in v0.4.1
func (c *MetricStore) GetNetworkMetric(networkName string, metricName string) (MetricData, error)
func (*MetricStore) GetNodeMetric ¶
func (c *MetricStore) GetNodeMetric(metricName string) (MetricData, error)
func (*MetricStore) GetNumaMetric ¶
func (c *MetricStore) GetNumaMetric(numaID int, metricName string) (MetricData, error)
func (*MetricStore) GetPodVolumeMetric ¶ added in v0.4.0
func (c *MetricStore) GetPodVolumeMetric(podUID, volumeName, metricName string) (MetricData, error)
func (*MetricStore) SetCPUMetric ¶
func (c *MetricStore) SetCPUMetric(cpuID int, metricName string, data MetricData)
func (*MetricStore) SetCgroupMetric ¶ added in v0.3.0
func (c *MetricStore) SetCgroupMetric(cgroupPath, metricName string, data MetricData)
func (*MetricStore) SetCgroupNumaMetric ¶ added in v0.3.0
func (c *MetricStore) SetCgroupNumaMetric(cgroupPath string, numaNode int, metricName string, data MetricData)
func (*MetricStore) SetContainerMetric ¶
func (c *MetricStore) SetContainerMetric(podUID, containerName, metricName string, data MetricData)
func (*MetricStore) SetContainerNumaMetric ¶
func (c *MetricStore) SetContainerNumaMetric(podUID, containerName string, numaID int, metricName string, data MetricData)
func (*MetricStore) SetDeviceMetric ¶
func (c *MetricStore) SetDeviceMetric(deviceName string, metricName string, data MetricData)
func (*MetricStore) SetNetworkMetric ¶ added in v0.4.1
func (c *MetricStore) SetNetworkMetric(networkName string, metricName string, data MetricData)
func (*MetricStore) SetNodeMetric ¶
func (c *MetricStore) SetNodeMetric(metricName string, data MetricData)
func (*MetricStore) SetNumaMetric ¶
func (c *MetricStore) SetNumaMetric(numaID int, metricName string, data MetricData)
func (*MetricStore) SetPodVolumeMetric ¶ added in v0.4.0
func (c *MetricStore) SetPodVolumeMetric(podUID, volumeName, metricName string, data MetricData)
Click to show internal directories.
Click to hide internal directories.