metrics

package
v0.0.0-...-794f3e4 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

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

Registry keeps track of metrics

func New

func New() *Registry

New metrics constructor

func (*Registry) Duration

func (r *Registry) Duration(id string, value float64, args ...string)

Duration metric for latency.

func (*Registry) Elapsed

func (r *Registry) Elapsed(id string, args ...string) func()

Elapsed metric.

func (*Registry) Incr

func (r *Registry) Incr(id string, args ...string)

Incr metric

func (*Registry) Set

func (r *Registry) Set(id string, val float64, args ...string)

Set gauge

func (*Registry) Summary

func (r *Registry) Summary() map[string]float64

Summary of metrics.

Jump to

Keyboard shortcuts

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