termstat

package
v0.0.0-...-96f1409 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package termstat provides a stats implementation which periodically logs the statistics to the given writer. It is meant to be used for testing and debugging at the terminal in lieu of an actual collector writing to an external tool like graphite or datadog. It provides stub implementations for some functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

Collector collects stats and prints them to the terminal

func NewCollector

func NewCollector(out io.Writer) *Collector

NewCollector initializes and returns a new TermStat.

func (*Collector) Count

func (t *Collector) Count(name string, value int64, rate float64, tags ...string)

Count adds value to the named stat at the specified rate.

func (*Collector) Gauge

func (t *Collector) Gauge(name string, value float64, rate float64, tags ...string)

Gauge does nothing.

func (*Collector) Histogram

func (t *Collector) Histogram(name string, value float64, rate float64, tags ...string)

Histogram does nothing.

func (*Collector) Set

func (t *Collector) Set(name string, value string, rate float64, tags ...string)

Set does nothing.

func (*Collector) Timing

func (t *Collector) Timing(name string, value time.Duration, rate float64, tags ...string)

Timing does nothing.

Jump to

Keyboard shortcuts

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