stats

package
v0.0.0-...-88c3b2e Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocate

type Allocate struct {
	Append, Replace, In *Counter
}

type Anteater

type Anteater struct {
	Version   string
	StartTime time.Time
}

type Counter

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

func (*Counter) Add

func (c *Counter) Add() uint64

func (*Counter) AddN

func (c *Counter) AddN(n int) uint64

func (*Counter) GetValue

func (c *Counter) GetValue() uint64

type Env

type Env struct {
	GoVersion    string
	NumGoroutine int
	Time         time.Time
	MemAlloc     uint64
}

func (*Env) Refresh

func (e *Env) Refresh()

type Stats

type Stats struct {
	Anteater *Anteater
	Storage  *Storage
	Allocate *Allocate
	Counters *StorageCounters
	Traffic  *Traffic
	Env      *Env
}

func New

func New() *Stats

func (*Stats) AsJson

func (s *Stats) AsJson() (b []byte)

func (*Stats) Info

func (s *Stats) Info() *StatsInfo

func (*Stats) Refresh

func (s *Stats) Refresh()

type StatsInfo

type StatsInfo struct {
	Anteater *Anteater         `json:"anteater"`
	Storage  *Storage          `json:"github.com/cheggaaa/Anteater/src/storage"`
	Allocate map[string]uint64 `json:"allocate"`
	Counters map[string]uint64 `json:"counters"`
	Traffic  map[string]uint64 `json:"traffic"`
	TrafficH map[string]string `json:"trafficHuman"`
	Env      *Env              `json:"env"`
}

type Storage

type Storage struct {
	ContainersCount int
	FilesCount      int64
	FilesSize       int64
	FilesRealSize   int64
	TotalSize       int64
	FreeSpace       int64
	HoleCount       int64
	HoleSize        int64
	IndexVersion    int64
	DumpSize        int64
	DumpSaveTime    time.Duration
	DumpLockTime    time.Duration
	DumpTime        time.Time
}

type StorageCounters

type StorageCounters struct {
	Get, Add, Delete, NotFound, NotModified *Counter
}

type Traffic

type Traffic struct {
	Input, Output *Counter
}

Jump to

Keyboard shortcuts

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