Documentation ¶
Index ¶
- type InternalStats
- func (s *InternalStats) Add(s2 *InternalStats) *InternalStats
- func (s *InternalStats) AverageLoadPenalty() time.Duration
- func (s *InternalStats) Eviction()
- func (s *InternalStats) EvictionCount() int64
- func (s *InternalStats) Hit()
- func (s *InternalStats) HitCount() int64
- func (s *InternalStats) HitRate() float64
- func (s *InternalStats) LoadCount() int64
- func (s *InternalStats) LoadError()
- func (s *InternalStats) LoadErrorCount() int64
- func (s *InternalStats) LoadErrorRate() float64
- func (s *InternalStats) LoadSuccess()
- func (s *InternalStats) LoadSuccessCount() int64
- func (s *InternalStats) LoadTime(loadTime time.Duration)
- func (s *InternalStats) LoadTotalTime() time.Duration
- func (s *InternalStats) Miss()
- func (s *InternalStats) MissCount() int64
- func (s *InternalStats) MissRate() float64
- func (s *InternalStats) RequestCount() int64
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 ¶
func (s *InternalStats) Add(s2 *InternalStats) *InternalStats
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) 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) 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