metrics

package
v0.0.0-...-560d035 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

type Aggregator interface {
	Bootstrap(ticks *server.TickManager)
	Collect() interface{}
}

type GlobalAggregator

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

func NewGlobalAggregator

func NewGlobalAggregator() *GlobalAggregator

func (*GlobalAggregator) BeginRequest

func (a *GlobalAggregator) BeginRequest()

func (*GlobalAggregator) Bootstrap

func (a *GlobalAggregator) Bootstrap(ticks server.TickManager)

func (*GlobalAggregator) Collect

func (a *GlobalAggregator) Collect() interface{}

func (*GlobalAggregator) EndRequest

func (a *GlobalAggregator) EndRequest()

type GlobalSnapshot

type GlobalSnapshot struct {
	Pid      int               `json:"pid"`
	Version  string            `json:"version"`
	Branch   string            `json:"branch"`
	Commit   string            `json:"commit"`
	Hostname string            `json:"hostname"`
	Runtime  RuntimeInfo       `json:"runtime"`
	Memory   *MemorySnapshot   `json:"memory"`
	TimeNow  time.Time         `json:"now"`
	TimeUp   float64           `json:"uptime"`
	Requests *RequestsSnapshot `json:"requests"`
}

type MemorySnapshot

type MemorySnapshot struct {
	Alloc        uint64 `json:"alloc"`
	TotalAlloc   uint64 `json:"totalAlloc"`
	Sys          uint64 `json:"sys"`
	Lookups      uint64 `json:"lookups"`
	Mallocs      uint64 `json:"mallocs"`
	Frees        uint64 `json:"frees"`
	HeapAlloc    uint64 `json:"heapAlloc"`
	HeapSys      uint64 `json:"heapSys"`
	HeapIdle     uint64 `json:"heapIdle"`
	HeapInUse    uint64 `json:"heapInUse"`
	HeapReleased uint64 `json:"heapReleased"`
	HeapObjects  uint64 `json:"heapObjects"`
	PauseTotalNs uint64 `json:"pauseTotal"`
	NumGC        uint32 `json:"numGC"`
	NumGoroutine int    `json:"numGoroutines"`
}

type RequestsAggregator

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

func NewRequestsAggregator

func NewRequestsAggregator() *RequestsAggregator

func (*RequestsAggregator) Begin

func (a *RequestsAggregator) Begin()

func (*RequestsAggregator) Bootstrap

func (a *RequestsAggregator) Bootstrap(ticks server.TickManager)

func (*RequestsAggregator) Collect

func (a *RequestsAggregator) Collect() *RequestsSnapshot

func (*RequestsAggregator) End

func (a *RequestsAggregator) End()

type RequestsSnapshot

type RequestsSnapshot struct {
	// Open   uint32 `json:"open"`
	Second uint32 `json:"second"`
	Minute uint32 `json:"minute"`
	Hour   uint32 `json:"hour"`
	Total  uint32 `json:"total"`
}

type RuntimeInfo

type RuntimeInfo struct {
	Arch     string `json:"arch"`
	Os       string `json:"os"`
	MaxProcs int    `json:"maxProcs"`
	Version  string `json:"version"`
}

Jump to

Keyboard shortcuts

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