...

Package goruntime

import "github.com/hyperledger/fabric/common/metrics/statsd/goruntime"
Overview
Index

Overview ▾

type Collector

type Collector struct {
    CgoCalls       metrics.Gauge
    GoRoutines     metrics.Gauge
    ThreadsCreated metrics.Gauge
    HeapAlloc      metrics.Gauge
    TotalAlloc     metrics.Gauge
    Mallocs        metrics.Gauge
    Frees          metrics.Gauge
    HeapSys        metrics.Gauge
    HeapIdle       metrics.Gauge
    HeapInuse      metrics.Gauge
    HeapReleased   metrics.Gauge
    HeapObjects    metrics.Gauge
    StackInuse     metrics.Gauge
    StackSys       metrics.Gauge
    MSpanInuse     metrics.Gauge
    MSpanSys       metrics.Gauge
    MCacheInuse    metrics.Gauge
    MCacheSys      metrics.Gauge
    BuckHashSys    metrics.Gauge
    GCSys          metrics.Gauge
    OtherSys       metrics.Gauge
    NextGC         metrics.Gauge
    LastGC         metrics.Gauge
    PauseTotalNs   metrics.Gauge
    PauseNs        metrics.Gauge
    NumGC          metrics.Gauge
    NumForcedGC    metrics.Gauge
}

func NewCollector

func NewCollector(p metrics.Provider) *Collector

func (*Collector) CollectAndPublish

func (c *Collector) CollectAndPublish(ticks <-chan time.Time)

func (*Collector) Publish

func (c *Collector) Publish(stats Stats)

type Stats

type Stats struct {
    CgoCalls       int64
    GoRoutines     int
    ThreadsCreated int
    MemStats       runtime.MemStats
}

func CollectStats

func CollectStats() Stats