Documentation ¶
Index ¶
- Constants
- func NewCacheNotShareStorage() (*storage, error)
- func NewStorage() (*storage, error)
- type AggregateInfo
- type AggregateParam
- type AggregationFunc
- type AggregationType
- type BECPUResourceMetric
- type BECPUResourceQueryResult
- type CPIMetric
- type CPUMetric
- type CPUThrottledMetric
- type Config
- type ContainerInterferenceMetric
- type ContainerInterferenceQueryResult
- type ContainerResourceMetric
- type ContainerResourceQueryResult
- type ContainerThrottledMetric
- type ContainerThrottledQueryResult
- type GPUMetric
- type GPUMetricsArray
- type InterferenceMetricName
- type MemoryMetric
- type MetricCache
- type NodeCPUInfo
- type NodeResourceMetric
- type NodeResourceQueryResult
- type PSIMetric
- type PodInterferenceMetric
- type PodInterferenceQueryResult
- type PodResourceMetric
- type PodResourceQueryResult
- type PodThrottledMetric
- type PodThrottledQueryResult
- type QueryParam
- type QueryResult
Constants ¶
View Source
const (
NodeCPUInfoRecordType = "NodeCPUInfo"
)
Variables ¶
This section is empty.
Functions ¶
func NewCacheNotShareStorage ¶
func NewCacheNotShareStorage() (*storage, error)
func NewStorage ¶
func NewStorage() (*storage, error)
Types ¶
type AggregateInfo ¶
type AggregateInfo struct { // TODO only support node resource metric now MetricStart *time.Time MetricEnd *time.Time MetricsCount int64 }
func (*AggregateInfo) TimeRangeDuration ¶ added in v1.1.0
func (a *AggregateInfo) TimeRangeDuration() time.Duration
type AggregateParam ¶
type AggregationFunc ¶ added in v0.6.0
type AggregationFunc func(interface{}, AggregateParam) (float64, error)
type AggregationType ¶
type AggregationType string
const ( AggregationTypeAVG AggregationType = "avg" AggregationTypeP99 AggregationType = "p99" AggregationTypeP95 AggregationType = "P95" AggregationTypeP90 AggregationType = "P90" AggregationTypeP50 AggregationType = "p50" AggregationTypeLast AggregationType = "last" AggregationTypeCount AggregationType = "count" )
type BECPUResourceMetric ¶
type BECPUResourceMetric struct { CPUUsed resource.Quantity // cpuUsed cores for BestEffort Cgroup CPURealLimit resource.Quantity // suppressCPUQuantity: if suppress by cfs_quota then this value is cfs_quota/cfs_period CPURequest resource.Quantity // sum(extendResources_Cpu:request) by all qos:BE pod }
type BECPUResourceQueryResult ¶
type BECPUResourceQueryResult struct { QueryResult Metric *BECPUResourceMetric }
type CPUThrottledMetric ¶
type CPUThrottledMetric struct {
ThrottledRatio float64
}
type Config ¶
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
type ContainerInterferenceMetric ¶ added in v1.0.0
type ContainerInterferenceMetric struct { MetricName InterferenceMetricName PodUID string ContainerID string MetricValue interface{} }
type ContainerInterferenceQueryResult ¶ added in v1.0.0
type ContainerInterferenceQueryResult struct { QueryResult Metric *ContainerInterferenceMetric }
type ContainerResourceMetric ¶
type ContainerResourceMetric struct { ContainerID string CPUUsed CPUMetric MemoryUsed MemoryMetric GPUs []GPUMetric }
type ContainerResourceQueryResult ¶
type ContainerResourceQueryResult struct { QueryResult Metric *ContainerResourceMetric }
type ContainerThrottledMetric ¶
type ContainerThrottledMetric struct { ContainerID string CPUThrottledMetric *CPUThrottledMetric }
type ContainerThrottledQueryResult ¶
type ContainerThrottledQueryResult struct { QueryResult Metric *ContainerThrottledMetric }
type GPUMetricsArray ¶ added in v0.6.0
type GPUMetricsArray []gpuResourceMetric
func (*GPUMetricsArray) Scan ¶ added in v0.6.0
func (array *GPUMetricsArray) Scan(value interface{}) error
Implement gorm customize data type. Read data from database.
type InterferenceMetricName ¶ added in v1.0.0
type InterferenceMetricName string
const ( MetricNameContainerCPI InterferenceMetricName = "ContainerCPI" MetricNameContainerPSI InterferenceMetricName = "ContainerPSI" MetricNamePodCPI InterferenceMetricName = "PodCPI" MetricNamePodPSI InterferenceMetricName = "PodPSI" )
type MemoryMetric ¶
type MetricCache ¶
type MetricCache interface { Run(stopCh <-chan struct{}) error GetNodeResourceMetric(param *QueryParam) NodeResourceQueryResult GetPodResourceMetric(podUID *string, param *QueryParam) PodResourceQueryResult GetContainerResourceMetric(containerID *string, param *QueryParam) ContainerResourceQueryResult GetNodeCPUInfo(param *QueryParam) (*NodeCPUInfo, error) GetBECPUResourceMetric(param *QueryParam) BECPUResourceQueryResult GetPodThrottledMetric(podUID *string, param *QueryParam) PodThrottledQueryResult GetContainerThrottledMetric(containerID *string, param *QueryParam) ContainerThrottledQueryResult GetContainerInterferenceMetric(metricName InterferenceMetricName, podUID *string, containerID *string, param *QueryParam) ContainerInterferenceQueryResult GetPodInterferenceMetric(metricName InterferenceMetricName, podUID *string, param *QueryParam) PodInterferenceQueryResult InsertNodeResourceMetric(t time.Time, nodeResUsed *NodeResourceMetric) error InsertPodResourceMetric(t time.Time, podResUsed *PodResourceMetric) error InsertContainerResourceMetric(t time.Time, containerResUsed *ContainerResourceMetric) error InsertNodeCPUInfo(info *NodeCPUInfo) error InsertBECPUResourceMetric(t time.Time, metric *BECPUResourceMetric) error InsertPodThrottledMetrics(t time.Time, metric *PodThrottledMetric) error InsertContainerThrottledMetrics(t time.Time, metric *ContainerThrottledMetric) error InsertContainerInterferenceMetrics(t time.Time, metric *ContainerInterferenceMetric) error InsertPodInterferenceMetrics(t time.Time, metric *PodInterferenceMetric) error }
func NewCacheNotShareMetricCache ¶
func NewCacheNotShareMetricCache(cfg *Config) (MetricCache, error)
func NewMetricCache ¶
func NewMetricCache(cfg *Config) (MetricCache, error)
type NodeCPUInfo ¶
type NodeCPUInfo util.LocalCPUInfo
type NodeResourceMetric ¶
type NodeResourceMetric struct { CPUUsed CPUMetric MemoryUsed MemoryMetric GPUs []GPUMetric }
type NodeResourceQueryResult ¶
type NodeResourceQueryResult struct { QueryResult Metric *NodeResourceMetric }
type PodInterferenceMetric ¶ added in v1.0.0
type PodInterferenceMetric struct { MetricName InterferenceMetricName PodUID string MetricValue interface{} }
type PodInterferenceQueryResult ¶ added in v1.0.0
type PodInterferenceQueryResult struct { QueryResult Metric *PodInterferenceMetric }
type PodResourceMetric ¶
type PodResourceMetric struct { PodUID string CPUUsed CPUMetric MemoryUsed MemoryMetric GPUs []GPUMetric }
type PodResourceQueryResult ¶
type PodResourceQueryResult struct { QueryResult Metric *PodResourceMetric }
type PodThrottledMetric ¶
type PodThrottledMetric struct { PodUID string CPUThrottledMetric *CPUThrottledMetric }
type PodThrottledQueryResult ¶
type PodThrottledQueryResult struct { QueryResult Metric *PodThrottledMetric }
type QueryParam ¶
type QueryParam struct { Aggregate AggregationType Start *time.Time End *time.Time }
func (*QueryParam) FillDefaultValue ¶
func (q *QueryParam) FillDefaultValue()
type QueryResult ¶
type QueryResult struct { AggregateInfo *AggregateInfo Error error }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_metriccache is a generated GoMock package.
|
Package mock_metriccache is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.