stats

package
v0.0.0-...-f1ada25 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package stats implements the internal logic for the statistics interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InternalStats

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

InternalStats is an internal stats recorder

All recording functions are thread-safe.

func (*InternalStats) Add

Add adds up two stats stores

func (*InternalStats) AverageLoadPenalty

func (s *InternalStats) AverageLoadPenalty() time.Duration

AverageLoadPenalty implements the Stats interface. Refer to its documentation for more details

func (*InternalStats) Eviction

func (s *InternalStats) Eviction()

Eviction increments the number of evictions

func (*InternalStats) EvictionCount

func (s *InternalStats) EvictionCount() int64

EvictionCount implements the Stats interface. Refer to its documentation for more details

func (*InternalStats) Hit

func (s *InternalStats) Hit()

Hit increments the number of hits

func (*InternalStats) HitCount

func (s *InternalStats) HitCount() int64

HitCount implements the Stats interface. Refer to its documentation for more details

func (*InternalStats) HitRate

func (s *InternalStats) HitRate() float64

HitRate implements the Stats interface. Refer to its documentation for more details

func (*InternalStats) LoadCount

func (s *InternalStats) LoadCount() int64

LoadCount implements the Stats interface. Refer to its documentation for more details

func (*InternalStats) LoadError

func (s *InternalStats) LoadError()

LoadError increments the number of error loads

func (*InternalStats) LoadErrorCount

func (s *InternalStats) LoadErrorCount() int64

LoadErrorCount implements the Stats interface. Refer to its documentation for more details

func (*InternalStats) LoadErrorRate

func (s *InternalStats) LoadErrorRate() float64

LoadErrorRate implements the Stats interface. Refer to its documentation for more details

func (*InternalStats) LoadSuccess

func (s *InternalStats) LoadSuccess()

LoadSuccess increments the number of success loads

func (*InternalStats) LoadSuccessCount

func (s *InternalStats) LoadSuccessCount() int64

LoadSuccessCount implements the Stats interface. Refer to its documentation for more details

func (*InternalStats) LoadTime

func (s *InternalStats) LoadTime(loadTime time.Duration)

LoadTime increments the total load time

func (*InternalStats) LoadTotalTime

func (s *InternalStats) LoadTotalTime() time.Duration

LoadTotalTime implements the Stats interface. Refer to its documentation for more details

func (*InternalStats) Miss

func (s *InternalStats) Miss()

Miss increments the number of misses

func (*InternalStats) MissCount

func (s *InternalStats) MissCount() int64

MissCount implements the Stats interface. Refer to its documentation for more details

func (*InternalStats) MissRate

func (s *InternalStats) MissRate() float64

MissRate implements the Stats interface. Refer to its documentation for more details

func (*InternalStats) RequestCount

func (s *InternalStats) RequestCount() int64

RequestCount implements the Stats interface. Refer to its documentation for more details

Jump to

Keyboard shortcuts

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