metrics

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	Name  string
	Value float64
}

type MetricSet

type MetricSet struct {
	Counters       map[string]uint64
	DurationCounts map[string]uint64
	DurationSums   map[string]float64
	Buckets        map[string]uint64
}

type Metrics

type Metrics struct {
	Names   map[string]MetricSet
	Buckets []Bucket
	// contains filtered or unexported fields
}

func New

func New() *Metrics

func NewWithBuckets

func NewWithBuckets(buckets []float64) *Metrics

func (*Metrics) Add

func (m *Metrics) Add(name string, labelName string, labelValue string, duration float64)

func (*Metrics) AddMetrics

func (m *Metrics) AddMetrics(s2 *Metrics)

func (*Metrics) Inc

func (m *Metrics) Inc(name string, labelName string, labelValue string, delta uint64)

func (*Metrics) ReadGob

func (m *Metrics) ReadGob(resp http.Response) error

func (*Metrics) Write

func (m *Metrics) Write(writer http.ResponseWriter)

func (*Metrics) WriteGob

func (m *Metrics) WriteGob(writer http.ResponseWriter) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳