stats

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stats

type Stats struct {
	Hits           int
	Miss           int
	ReadBytes      int
	WriteBytes     int
	ReadCount      int
	WriteCount     int
	DeleteCount    int
	ClearCount     int
	ErrReadCount   int
	ErrWriteCount  int
	ErrDeleteCount int
	ErrClearCount  int
}

Stats collects significant metrics about cache operations.

type SyncStats

type SyncStats struct {
	Stats
	// contains filtered or unexported fields
}

SyncStats implements concurrency-safe methods above Stats data fields.

func (*SyncStats) ErrClear

func (s *SyncStats) ErrClear()

ErrClear increments the clear error counter.

func (*SyncStats) ErrDelete

func (s *SyncStats) ErrDelete()

ErrDelete increments the delete error counter.

func (*SyncStats) ErrRead

func (s *SyncStats) ErrRead()

ErrRead increments the read error counter.

func (*SyncStats) ErrWrite

func (s *SyncStats) ErrWrite()

ErrWrite increments the write error counter.

func (*SyncStats) IncClear

func (s *SyncStats) IncClear()

IncClear increments metrics of clear operation.

func (*SyncStats) IncDelete

func (s *SyncStats) IncDelete()

IncDelete increments metrics of delete operation.

func (*SyncStats) IncRead

func (s *SyncStats) IncRead(hits bool, n int)

IncRead increments metrics of read operation.

func (*SyncStats) IncWrite

func (s *SyncStats) IncWrite(n int)

IncWrite increments metrics of write operation.

func (*SyncStats) Reset

func (s *SyncStats) Reset()

Reset sets all metric fields to zero-value.

func (*SyncStats) Snapshot

func (s *SyncStats) Snapshot() Stats

Snapshot returns copy of collected metrics.

Jump to

Keyboard shortcuts

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