procstats

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartCollector

func StartCollector(collector Collector) io.Closer

func StartCollectorWith

func StartCollectorWith(config Config) io.Closer

Types

type Collector

type Collector interface {
	Collect()
}

func MultiCollector

func MultiCollector(collectors ...Collector) Collector

type CollectorFunc

type CollectorFunc func()

func (CollectorFunc) Collect

func (f CollectorFunc) Collect()

type Config

type Config struct {
	Collector       Collector
	CollectInterval time.Duration
}

type GoMetrics

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

GoMetrics is a metric collector that reports metrics from the Go runtime.

func NewGoMetrics

func NewGoMetrics() *GoMetrics

NewGoMetrics creates a new collector for the Go runtime that produces metrics on the default stats engine.

func NewGoMetricsWith

func NewGoMetricsWith(eng *stats.Engine) *GoMetrics

NewGoMetricsWith creates a new collector for the Go unrtime that producers metrics on eng.

func (*GoMetrics) Collect

func (g *GoMetrics) Collect()

Collect satisfies the Collector interface.

type ProcMetrics

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

ProcMetrics is a metric collector that reports metrics on processes.

func NewProcMetrics

func NewProcMetrics() *ProcMetrics

NewProdMetrics collects metrics on the current process and reports them to the default stats engine.

func NewProcMetricsWith

func NewProcMetricsWith(eng *stats.Engine, pid int) *ProcMetrics

NewProcMetricsWith collects metrics on the process identified by pid and reports them to eng.

func (*ProcMetrics) Collect

func (p *ProcMetrics) Collect()

Collect satsifies the Collector interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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