collector

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Copyright 2023.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2023.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// NodeMetrics holds all node energy and resource usage metrics
	NodeMetrics collector_metric.NodeMetrics

	// ContainersMetrics holds all container energy and resource usage metrics
	ContainersMetrics map[string]*collector_metric.ContainerMetrics

	// ProcessMetrics hold all process energy and resource usage metrics
	ProcessMetrics map[uint64]*collector_metric.ProcessMetrics

	// VMMetrics hold all Virtual Machine energy and resource usage metrics
	VMMetrics map[uint64]*collector_metric.VMMetrics
	// contains filtered or unexported fields
}

func NewCollector

func NewCollector() *Collector

func (*Collector) Destroy

func (c *Collector) Destroy()

func (*Collector) Initialize

func (c *Collector) Initialize() error

func (*Collector) Update

func (c *Collector) Update()

Update updates the node and container energy and resource usage metrics

type ContainerDesc

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

type NodeDesc

type NodeDesc struct {

	// Additional metrics (gauge)
	// TODO: review if we really need to expose this metric.
	NodeCPUFrequency *prometheus.Desc

	// QAT metrics
	NodeQATUtilization *prometheus.Desc
	// contains filtered or unexported fields
}

type PodDesc

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

metric used by the model server to train the model

type ProcessBPFMetrics

type ProcessBPFMetrics = attacher.ProcessBPFMetrics

type PrometheusCollector

type PrometheusCollector struct {

	// NodeMetrics holds all node energy and resource usage metrics
	NodeMetrics *collector_metric.NodeMetrics

	// ContainersMetrics holds all container energy and resource usage metrics
	ContainersMetrics *map[string]*collector_metric.ContainerMetrics

	// ProcessMetrics hold all process energy and resource usage metrics
	ProcessMetrics *map[uint64]*collector_metric.ProcessMetrics

	// VMMetrics hold all Virtual Machine energy and resource usage metrics
	VMMetrics *map[uint64]*collector_metric.VMMetrics

	// SamplePeriodSec the collector metric collection interval
	SamplePeriodSec float64

	// Lock to syncronize the collector update with prometheus exporter
	Mx sync.Mutex

	// Record whether we have cGroupsMetrics
	HavecGroupsMetric bool
	// contains filtered or unexported fields
}

PrometheusCollector holds the list of prometheus metrics for both node and pod context

func NewPrometheusExporter

func NewPrometheusExporter() *PrometheusCollector

NewPrometheusExporter create and initialize all the PrometheusCollector structures

func (*PrometheusCollector) Collect

func (p *PrometheusCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface

func (*PrometheusCollector) Describe

func (p *PrometheusCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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