info

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2017 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Information

type Information struct {
	// Server's hostname.
	Host string `json:"host"`
	// Server's operating system.
	OS string `json:"os"`
	// Server's architecture.
	Arch string `json:"arch"`
	// Number of server's CPUs
	NumCPU int `json:"cpu-count"`
	// Version of Go that executable was build with.
	GoVersion string `json:"go-version"`

	// Bytes allocated and not yet freed.
	Alloc marshal.Bytes `json:"mem-used"`
	// Bytes allocated and not yet freed.
	AllocBytes uint64 `json:"mem-used-bytes"`
	// Bytes allocated (even if freed).
	TotalAlloc marshal.Bytes `json:"mem-allocated"`
	// Bytes allocated (even if freed).
	TotalAllocBytes uint64 `json:"mem-allocated-bytes"`
	// Bytes obtained from system.
	Sys marshal.Bytes `json:"mem-sys"`
	// Bytes obtained from system.
	SysBytes uint64 `json:"mem-sys-bytes"`
	// Number of pointer lookups.
	Lookups uint64 `json:"lookups"`
	// Number of mallocs.
	Mallocs uint64 `json:"mallocs"`
	// Number of frees.
	Frees uint64 `json:"mem-frees"`

	// Bytes allocated and not yet freed (same as Alloc above).
	HeapAlloc marshal.Bytes `json:"heap-used"`
	// Bytes allocated and not yet freed (same as Alloc above).
	HeapAllocBytes uint64 `json:"heap-used-bytes"`
	// Bytes obtained from system.
	HeapSys marshal.Bytes `json:"heap-sys"`
	// Bytes obtained from system.
	HeapSysBytes uint64 `json:"heap-sys-bytes"`
	// Bytes in idle spans.
	HeapIdle marshal.Bytes `json:"heap-idle"`
	// Bytes in idle spans.
	HeapIdleBytes uint64 `json:"heap-idle-bytes"`
	// Bytes in non-idle span.
	HeapInuse marshal.Bytes `json:"heap-inuse"`
	// Bytes in non-idle span.
	HeapInuseBytes uint64 `json:"heap-inuse-bytes"`
	// Bytes released to the OS.
	HeapReleased marshal.Bytes `json:"heap-released"`
	// Bytes released to the OS.
	HeapReleasedBytes uint64 `json:"heap-released-bytes"`
	// Total number of allocated objects.
	HeapObjects uint64 `json:"heap-objects"`

	// Pprof stack counts
	StackCount map[string]int `json:"stack-count"`
}

Information represents selected data provided by memstats and pprof.

func NewInformation

func NewInformation() *Information

NewInformation creates and populates a new instance of info.Information.

func (*Information) Update

func (i *Information) Update()

Update updates Information with current data.

Jump to

Keyboard shortcuts

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