godropbox: github.com/dropbox/godropbox/stats Index | Files

package stats

import "github.com/dropbox/godropbox/stats"

package stats provides a set of interfaces to log stats including a no-op implementation that doesn't do anything. This is useful to instrument metrics within open-sourced components.

Index

Package Files

composite.go doc.go noop.go stats.go

type CounterStat Uses

type CounterStat interface {
    Inc()
    Add(float64)
}

type GaugeStat Uses

type GaugeStat interface {
    Set(float64)
    Get() float64

    Inc()
    Add(float64)

    Dec()
    Sub(float64)
}

type StatsFactory Uses

type StatsFactory interface {
    NewCounter(
        metric string,
        tags map[string]string) CounterStat

    NewGauge(
        metric string,
        tags map[string]string) GaugeStat

    NewSummary(
        metric string,
        tags map[string]string) SummaryStat
}
var (
    NoOpStatsFactory StatsFactory
)

func NewCompositeFactory Uses

func NewCompositeFactory(factories ...StatsFactory) StatsFactory

type SummaryStat Uses

type SummaryStat interface {
    Observe(float64)
}

Package stats is imported by 1 packages. Updated 2017-08-17. Refresh now. Tools for package owners.