memstat

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2015 License: Apache-2.0, Apache-2.0 Imports: 11 Imported by: 2

Documentation

Overview

Package memstat implements metrics collection related to Memory usage

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemStat

type MemStat struct {
	RawFree   *metrics.Gauge
	Active    *metrics.Gauge
	Inactive  *metrics.Gauge
	Wired     *metrics.Gauge
	Purgeable *metrics.Gauge
	RawTotal  *metrics.Gauge
	Pagesize  C.vm_size_t
	// contains filtered or unexported fields
}

MemStat represents memory usage statistics

func New

func New(m *metrics.MetricContext, Step time.Duration) *MemStat

New registers with metriccontext and starts metric collection every Step

func (*MemStat) Collect

func (s *MemStat) Collect()

Collect uses mach interface to populate various memory usage metrics

func (*MemStat) Free

func (s *MemStat) Free() float64

Free returns free memory Inactive lists may contain dirty pages Unfortunately there doesn't seem to be easy way to get that count

func (*MemStat) Total

func (s *MemStat) Total() float64

Total returns total physical memory

func (*MemStat) Usage

func (s *MemStat) Usage() float64

Usage returns physical memory in use

Jump to

Keyboard shortcuts

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