metrics

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterByMode

type CounterByMode struct {
	Counters map[string]metrics.Counter
	// contains filtered or unexported fields
}

CounterByMode - container for mode counters, registry and flush interval

func NewModeCounter

func NewModeCounter(modes []string) *CounterByMode

NewModeCounter - returns new counter instance

func (*CounterByMode) Count

func (c *CounterByMode) Count(mode string)

Count - counts requests based on mode

func (*CounterByMode) Flush

func (c *CounterByMode) Flush() (h Stats)

Flush gets current metrics from stats registry

func (*CounterByMode) Init

func (c *CounterByMode) Init()

Init initializes logging

type Stats

type Stats struct {
	Counters    map[string]int64   `json:"counters"`
	Gauges      map[string]int64   `json:"gauges,omitempty"`
	GaugesFloat map[string]float64 `json:"gaugesFloat,omitempty"`
}

Stats - holds information about various system metrics like requests counts

Jump to

Keyboard shortcuts

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