statistics

package
Version: v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	Enabled() bool
	HistoryResolution() time.Duration
	HistoryMaxAge() time.Duration
}

type Desc

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

type DisabledStatistics

type DisabledStatistics struct{}

func (DisabledStatistics) Enabled

func (s DisabledStatistics) Enabled() bool

func (*DisabledStatistics) GetHierarchicalCounts

func (s *DisabledStatistics) GetHierarchicalCounts() HierarchicalCounts

func (*DisabledStatistics) GetHierarchicalCountsStructless

func (s *DisabledStatistics) GetHierarchicalCountsStructless() interface{}

func (*DisabledStatistics) IncrementOne

func (s *DisabledStatistics) IncrementOne(module, name, field string)

type HierarchicalCount

type HierarchicalCount struct {
	Total     int
	Last10Res int
	LastMax   int
}

type HierarchicalCounts

type HierarchicalCounts map[string]map[string]map[string]HierarchicalCount

type HistoricalCount

type HistoricalCount struct {
	NewerThan time.Time
	Count     map[Desc]int
}

type InMemmoryStatistics

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

func RunInMemory

func RunInMemory(config Config) (stats *InMemmoryStatistics)

func (InMemmoryStatistics) Enabled

func (s InMemmoryStatistics) Enabled() bool

func (*InMemmoryStatistics) GetHierarchicalCounts

func (s *InMemmoryStatistics) GetHierarchicalCounts() HierarchicalCounts

func (*InMemmoryStatistics) GetHierarchicalCountsStructless

func (s *InMemmoryStatistics) GetHierarchicalCountsStructless() interface{}

func (*InMemmoryStatistics) IncrementOne

func (s *InMemmoryStatistics) IncrementOne(module, name, field string)

type Statistics

type Statistics interface {
	Enabled() bool
	IncrementOne(module, name, field string)
	GetHierarchicalCountsStructless() interface{}
	GetHierarchicalCounts() HierarchicalCounts
}

func Run

func Run(config Config) (stats Statistics)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL