metrics

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USPerS = 1000000    // million
	NSPerS = 1000000000 // billion

)

Variables

This section is empty.

Functions

func MetricsHandler

func MetricsHandler(root string) http.HandlerFunc

func ProcInfo

func ProcInfo(pids map[uint64]bool) map[string]Process

Given a set of PIDs, aggregate process count, memory, and CPU usage on the process name associated with the PIDs. Returns a map of process names -> aggregate usage.

Types

type Collector

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

func NewCollector

func NewCollector(root string) *Collector

func (*Collector) Collect

func (c *Collector) Collect(ch chan<- prometheus.Metric)

func (*Collector) CollectMetrics

func (c *Collector) CollectMetrics() []Metric

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prometheus.Desc)

type Metric

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

type Process

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

Jump to

Keyboard shortcuts

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