stats

package
v0.0.0-...-88aa921 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2015 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOpenFileDescriptorCount

func GetOpenFileDescriptorCount() (int64, error)

GetOpenFileDescriptorCount returns the number of open file descriptors for the process id of the caller.

func Post

func Post(destination string, stats []Sample) error

Send the list of stats to the TSDB.

Types

type Sample

type Sample struct {
	Metric    string            `json:"metric"`
	Value     string            `json:"value"`
	Timestamp int64             `json:"timestamp"`
	Tags      map[string]string `json:"tags"`
}

Sample is a single metric measurement

type StatsReporter

type StatsReporter struct {
	sync.Mutex
	// contains filtered or unexported fields
}

StatsReporter collects and posts serviced stats to the TSDB.

func NewStatsReporter

func NewStatsReporter(destination string, interval time.Duration, conn coordclient.Connection) (*StatsReporter, error)

NewStatsReporter creates a new StatsReporter and kicks off the reporting goroutine.

func (*StatsReporter) Close

func (sr *StatsReporter) Close()

Close shuts down the reporting goroutine. Blocks waiting for the goroutine to signal that it is indeed shutting down.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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