metrics

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package metrics implements generic metrics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

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

Counter keeps count of metrics for parallel running routines.

func (*Counter) Add

func (c *Counter) Add(count int64, metric string)

Add adds count to metric. If metric doesn't exist, it creates it.

func (*Counter) Get

func (c *Counter) Get(name string) (int64, bool)

Get returns the value of a specific metric based on its name as well as a bool indicating the value was read successfully.

func (*Counter) Metrics

func (c *Counter) Metrics() []string

Metrics returns a slice of metrics which are tracked.

Jump to

Keyboard shortcuts

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