metrics

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CPUTime

func CPUTime() (float64, error)

CPUTime returns an amount of CPU time (in seconds) assigned to executor process by system.

func CaptureCPUTime

func CaptureCPUTime(interval time.Duration)

CaptureCPUTime starts collecting cpu time of the executor process with given interval. It is a blocking call so it is advised to call this function in goroutine.

func Init added in v0.11.1

func Init(id string)

Init processes the environment in search of Graphite configuration and sets up a connection

func SetupGraphite

func SetupGraphite(cfg GraphiteConfig) error

SetupGraphite will configure metric system to periodically send metrics to Graphite.

func SetupStderr

func SetupStderr()

SetupStderr will configure metric system to periodically print metrics on stderr.

Types

type GraphiteConfig

type GraphiteConfig struct {
	Host   string
	Port   int    `default:"2003"`
	Prefix string `default:"allegro.executor"`
}

GraphiteConfig holds basic Graphite configuration.

Jump to

Keyboard shortcuts

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