shmstats

package
v0.0.0-...-9750751 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Finalize

func Finalize()

func GetCurrentWorkerStatsManager

func GetCurrentWorkerStatsManager() *workerStatsManagerT

func GetWorkerStatsManager

func GetWorkerStatsManager(workerId int) *workerStatsManagerT

func InitForManager

func InitForManager(numChildren int) (err error)

func InitForMonitor

func InitForMonitor() (err error)

func InitForRead

func InitForRead(pid int) (err error)

func InitForWorker

func InitForWorker(isChild bool, workerId int, zoneId uint32, machineIndex uint32) error

func PrettyPrint

func PrettyPrint(w io.Writer, workerId string)

func SetMonPorts

func SetMonPorts(addrs []string)

func WriteStatsInJson

func WriteStatsInJson(w io.Writer, workerId string, indent bool)

Types

type InboundConnStats

type InboundConnStats struct {
	NumConnections  uint32
	MaxNumConntions uint32
}

type ReqProcStats

type ReqProcStats struct {
	NumRequests       uint64
	RequestsPerSecond uint32
	AvgReqProcTime    uint32

	NumReads       uint64 //use fixed size array?
	NumDeletes     uint64
	NumCommits     uint64
	NumAborts      uint64
	NumRepairs     uint64
	NumMarkDeletes uint64
	ProcCpuUsage   float32
	MachCpuUsage   float32
}

type ServerStats

type ServerStats struct {
	StartTimestampNs int64
	NumShards        uint32
	NumZones         uint32
	NumWorkers       uint32
	Pid              uint32
}

func GetServerStats

func GetServerStats() (stats ServerStats)

func (*ServerStats) PrettyPrint

func (s *ServerStats) PrettyPrint(w io.Writer)

type ShmStatsManager

type ShmStatsManager struct {
	stats.SharedStats
	// contains filtered or unexported fields
}

func (*ShmStatsManager) InitForManager

func (s *ShmStatsManager) InitForManager(numChildren int) (err error)

func (*ShmStatsManager) InitForWorker

func (s *ShmStatsManager) InitForWorker(isChild bool, workerId int, zoneId uint32, machineIndex uint32) (err error)

func (*ShmStatsManager) PrettyPrint

func (s *ShmStatsManager) PrettyPrint(iw io.Writer, workerId string)

func (*ShmStatsManager) SetMonPorts

func (s *ShmStatsManager) SetMonPorts(addrs []string)

type StorageStats

type StorageStats struct {
	Free                uint64 // in Megabytes
	Used                uint64 // in Megabytes
	NumKeys             uint64
	MaxDBLevel          uint32
	CompSecByInterval   uint32
	CompCountByInterval uint32
	PendingCompKBytes   uint64
	DelayedWriteRate    uint64
}

type WorkerStats

type WorkerStats struct {
	Pid              uint32
	Port             uint16
	MonPort          uint16
	StartTimestampNs int64
	ZoneId           uint32
	MachineIndex     uint32
	LastExitCode     int32
	NumStarts        uint16
	ReqProcStats
	StorageStats
	InboundConnStats
}

Jump to

Keyboard shortcuts

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