pilosa: github.com/pilosa/pilosa/stats Index | Files

package stats

import "github.com/pilosa/pilosa/stats"

Index

Package Files

stats.go

Variables

var Expvar = expvar.NewMap("index")

Expvar global expvar map.

func NewExpvarStatsClient Uses

func NewExpvarStatsClient() *expvarStatsClient

NewExpvarStatsClient returns a new instance of ExpvarStatsClient. This client points at the root of the expvar index map.

type MultiStatsClient Uses

type MultiStatsClient []StatsClient

MultiStatsClient joins multiple stats clients together.

func (MultiStatsClient) Close Uses

func (a MultiStatsClient) Close() error

Close shuts down the stats clients.

func (MultiStatsClient) Count Uses

func (a MultiStatsClient) Count(name string, value int64, rate float64)

Count tracks the number of times something occurs per second on all clients.

func (MultiStatsClient) CountWithCustomTags Uses

func (a MultiStatsClient) CountWithCustomTags(name string, value int64, rate float64, tags []string)

CountWithCustomTags Tracks the number of times something occurs per second with custom tags

func (MultiStatsClient) Gauge Uses

func (a MultiStatsClient) Gauge(name string, value float64, rate float64)

Gauge sets the value of a metric on all clients.

func (MultiStatsClient) Histogram Uses

func (a MultiStatsClient) Histogram(name string, value float64, rate float64)

Histogram tracks statistical distribution of a metric on all clients.

func (MultiStatsClient) Open Uses

func (a MultiStatsClient) Open()

Open starts the stat service.

func (MultiStatsClient) Set Uses

func (a MultiStatsClient) Set(name string, value string, rate float64)

Set tracks number of unique elements on all clients.

func (MultiStatsClient) SetLogger Uses

func (a MultiStatsClient) SetLogger(logger logger.Logger)

SetLogger Sets the StatsD logger output type.

func (MultiStatsClient) Tags Uses

func (a MultiStatsClient) Tags() []string

Tags returns tags from the first client.

func (MultiStatsClient) Timing Uses

func (a MultiStatsClient) Timing(name string, value time.Duration, rate float64)

Timing tracks timing information for a metric on all clients.

func (MultiStatsClient) WithTags Uses

func (a MultiStatsClient) WithTags(tags ...string) StatsClient

WithTags returns a new set of clients with the additional tags.

type StatsClient Uses

type StatsClient interface {
    // Returns a sorted list of tags on the client.
    Tags() []string

    // Returns a new client with additional tags appended.
    WithTags(tags ...string) StatsClient

    // Tracks the number of times something occurs per second.
    Count(name string, value int64, rate float64)

    // Tracks the number of times something occurs per second with custom tags
    CountWithCustomTags(name string, value int64, rate float64, tags []string)

    // Sets the value of a metric.
    Gauge(name string, value float64, rate float64)

    // Tracks statistical distribution of a metric.
    Histogram(name string, value float64, rate float64)

    // Tracks number of unique elements.
    Set(name string, value string, rate float64)

    // Tracks timing information for a metric.
    Timing(name string, value time.Duration, rate float64)

    // SetLogger Set the logger output type
    SetLogger(logger logger.Logger)

    // Starts the service
    Open()

    // Closes the client
    Close() error
}

StatsClient represents a client to a stats server.

var NopStatsClient StatsClient = &nopStatsClient{}

NopStatsClient represents a client that doesn't do anything.

Package stats imports 6 packages (graph) and is imported by 8 packages. Updated 2019-10-21. Refresh now. Tools for package owners.