metric

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectMetrics

func CollectMetrics() []byte

func GetMetricValue

func GetMetricValue(col prometheus.Collector) float64

func MemoryUsage

func MemoryUsage() (virt, rss uint64)

func MetricsFlags

func MetricsFlags() []cli.Flag

func UpdateBaseMetrics

func UpdateBaseMetrics()

Types

type Rusage

type Rusage struct {
	syscall.Rusage
}

func GetRusage

func GetRusage() *Rusage

GetRusage returns CPU usage of current process.

func (*Rusage) GetStime

func (ru *Rusage) GetStime() float64

GetStime returns the system time in seconds.

func (*Rusage) GetUtime

func (ru *Rusage) GetUtime() float64

GetUtime returns the user time in seconds.

Jump to

Keyboard shortcuts

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