stats

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a client for statistics information & support dump all keys checkout https://github.com/memcached/memcached/blob/master/doc/protocol.txt for more information

func New

func New(addr string, options ...Option) *Client

New ...

func (*Client) Close

func (c *Client) Close() error

Close ...

func (*Client) GetGeneralStats

func (c *Client) GetGeneralStats() (GeneralStats, error)

GetGeneralStats ...

func (*Client) GetSlabItemsStats added in v0.4.3

func (c *Client) GetSlabItemsStats() (SlabItemsStats, error)

GetSlabItemsStats ...

func (*Client) GetSlabsStats

func (c *Client) GetSlabsStats() (SlabsStats, error)

GetSlabsStats ...

func (*Client) MetaDumpAll

func (c *Client) MetaDumpAll(scanFunc func(key MetaDumpKey)) error

MetaDumpAll ...

type Error

type Error struct {
	Msg string
}

Error ...

func NewError

func NewError(msg string) *Error

NewError ...

func (*Error) Error

func (e *Error) Error() string

type GeneralStats

type GeneralStats struct {
	PID    uint64
	Uptime uint64
}

GeneralStats ...

type MetaDumpKey

type MetaDumpKey struct {
	Key   string
	Exp   int64
	LA    int64
	CAS   uint64
	Fetch bool
	Class uint32
	Size  uint32
}

MetaDumpKey ...

type Option

type Option func(conf *dialConfig)

Option ...

func WithErrorLogger

func WithErrorLogger(logger func(err error)) Option

WithErrorLogger ...

func WithNetConnOptions added in v0.4.3

func WithNetConnOptions(options ...netconn.Option) Option

WithNetConnOptions ...

type SingleSlabItemStats added in v0.4.3

type SingleSlabItemStats struct {
	Number     uint64
	NumberHot  uint64
	NumberWarm uint64
	NumberCold uint64
	AgeHot     uint64
	AgeWarm    uint64
	Age        uint64

	MemRequested uint64

	Evicted        uint64
	EvictedNonZero uint64
	EvictedTime    uint64
	OutOfMemory    uint64
	TailRepairs    uint64
	Reclaimed      uint64

	ExpiredUnfetched uint64
	EvictedUnfetched uint64
	EvictedActive    uint64

	CrawlerReclaimed    uint64
	CrawlerItemsChecked uint64
	LRUTailRefLocked    uint64

	MovesToCold    uint64
	MovesToWarm    uint64
	MovesWithinLRU uint64

	DirectReclaims uint64
	HitsToHot      uint64
	HitsToWarm     uint64
	HitsToCold     uint64
	HitsToTemp     uint64
}

SingleSlabItemStats ...

type SingleSlabStats

type SingleSlabStats struct {
	ChunkSize     uint32
	ChunksPerPage uint32
	TotalPages    uint32
	TotalChunks   uint64
	UsedChunks    uint64
}

SingleSlabStats ...

type SlabItemsStats added in v0.4.3

type SlabItemsStats struct {
	SlabIDs []uint32
	Slabs   map[uint32]SingleSlabItemStats
}

SlabItemsStats ...

type SlabsStats

type SlabsStats struct {
	ActiveSlabs   uint32
	TotalMalloced uint64

	SlabIDs []uint32
	Slabs   map[uint32]SingleSlabStats
}

SlabsStats ...

Jump to

Keyboard shortcuts

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