stats

package
v0.0.0-...-9931aa1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignRequest

func AssignRequest()

func BytesIn

func BytesIn(val int64)

func BytesOut

func BytesOut(val int64)

func ConnectionClose

func ConnectionClose()

func ConnectionOpen

func ConnectionOpen()

func DeleteRequest

func DeleteRequest()

func ReadRequest

func ReadRequest()

func RequestClose

func RequestClose()

func RequestOpen

func RequestOpen()

func WriteRequest

func WriteRequest()

Types

type Channels

type Channels struct {
	Connections    chan *TimedValue
	Requests       chan *TimedValue
	AssignRequests chan *TimedValue
	ReadRequests   chan *TimedValue
	WriteRequests  chan *TimedValue
	DeleteRequests chan *TimedValue
	BytesIn        chan *TimedValue
	BytesOut       chan *TimedValue
}
var (
	Chan *Channels
)

type DiskStatus

type DiskStatus struct {
	Dir  string
	All  uint64
	Used uint64
	Free uint64
}

func NewDiskStatus

func NewDiskStatus(path string) (disk *DiskStatus)

type DurationCounter

type DurationCounter struct {
	MinuteCounter *RoundRobinCounter
	HourCounter   *RoundRobinCounter
	DayCounter    *RoundRobinCounter
	WeekCounter   *RoundRobinCounter
}

func NewDurationCounter

func NewDurationCounter() *DurationCounter

func (*DurationCounter) Add

func (sc *DurationCounter) Add(tv *TimedValue)

Add is for cumulative counts

type MemStatus

type MemStatus struct {
	Goroutines int
	All        uint64
	Used       uint64
	Free       uint64
	Self       uint64
	Heap       uint64
	Stack      uint64
}

func MemStat

func MemStat() MemStatus

type RoundRobinCounter

type RoundRobinCounter struct {
	LastIndex int
	Values    []int64
	Counts    []int64
}

func NewRoundRobinCounter

func NewRoundRobinCounter(slots int) *RoundRobinCounter

func (*RoundRobinCounter) Add

func (rrc *RoundRobinCounter) Add(index int, val int64)

func (*RoundRobinCounter) Count

func (rrc *RoundRobinCounter) Count() (cnt int64)

func (*RoundRobinCounter) Max

func (rrc *RoundRobinCounter) Max() (max int64)

func (*RoundRobinCounter) Sum

func (rrc *RoundRobinCounter) Sum() (sum int64)

func (*RoundRobinCounter) ToList

func (rrc *RoundRobinCounter) ToList() (ret []int64)

type ServerStats

type ServerStats struct {
	Requests       *DurationCounter
	Connections    *DurationCounter
	AssignRequests *DurationCounter
	ReadRequests   *DurationCounter
	WriteRequests  *DurationCounter
	DeleteRequests *DurationCounter
	BytesIn        *DurationCounter
	BytesOut       *DurationCounter
}

func NewServerStats

func NewServerStats() *ServerStats

func (*ServerStats) Start

func (ss *ServerStats) Start()

type TimedValue

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

func NewTimedValue

func NewTimedValue(t time.Time, val int64) *TimedValue

Jump to

Keyboard shortcuts

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