debugstats

package
v5.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package debugstats simplifies metric troubleshooting by sending metrics to any io.Writer.

By default, metrics will be printed to os.Stdout. Use the Dst and Grep fields to customize the output as appropriate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Dst  io.Writer
	Grep *regexp.Regexp
}

Client will print out received metrics. If Dst is nil, metrics will be printed to stdout, otherwise they will be printed to Dst.

You can optionally provide a Grep regexp to limit printed metrics to ones matching the regular expression.

func (*Client) HandleMeasures

func (c *Client) HandleMeasures(t time.Time, measures ...stats.Measure)

func (*Client) Write

func (c *Client) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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