metric

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const AGGREGATION_SPAN = 10 * time.Minute
View Source
const NTP_QUERY_INTERVAL = 30 * time.Second
View Source
const PAGESIZE = 4096
View Source
const ROTATE_INTERVAL = 30 * time.Second
View Source
const RUNTIME_QUERY_INTERVAL = 5 * time.Second

Variables

This section is empty.

Functions

func NewNtpReporter added in v1.1.0

func NewNtpReporter(ctx context.Context, metricFactory Factory, logger log.Logger, ntpServerAddress string) govnr.ShutdownWaiter

func NewRegistry

func NewRegistry() *inMemoryRegistry

func NewRuntimeReporter

func NewRuntimeReporter(ctx context.Context, metricFactory Factory, logger log.Logger) govnr.ShutdownWaiter

func NewSystemReporter added in v0.7.11

func NewSystemReporter(ctx context.Context, metricFactory Factory, logger log.Logger) govnr.ShutdownWaiter

func RegisterConfigIndicators added in v1.1.0

func RegisterConfigIndicators(metricRegistry Registry, nodeConfig config.NodeConfig)

Types

type Factory

type Factory interface {
	NewHistogram(name string, maxValue int64) *Histogram
	NewLatency(name string, maxDuration time.Duration) *Histogram
	NewGauge(name string) *Gauge
	NewRate(name string) *Rate
	NewText(name string, defaultValue ...string) *Text
}

type Gauge

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

func (*Gauge) Add

func (g *Gauge) Add(i int64)

func (*Gauge) AddUint32

func (g *Gauge) AddUint32(i uint32)

func (*Gauge) Dec

func (g *Gauge) Dec()

func (*Gauge) Export

func (g *Gauge) Export() exportedMetric

func (*Gauge) Inc

func (g *Gauge) Inc()

func (*Gauge) Name

func (m *Gauge) Name() string

func (*Gauge) String

func (g *Gauge) String() string

func (*Gauge) SubUint32

func (g *Gauge) SubUint32(size uint32)

func (*Gauge) Update

func (g *Gauge) Update(i int64)

func (*Gauge) UpdateUInt32

func (g *Gauge) UpdateUInt32(i int32)

func (*Gauge) Value

func (g *Gauge) Value() int64

type Histogram

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

func (*Histogram) Export

func (h *Histogram) Export() exportedMetric

func (*Histogram) Name

func (m *Histogram) Name() string

func (*Histogram) Record added in v0.7.11

func (h *Histogram) Record(measurement int64)

func (*Histogram) RecordSince

func (h *Histogram) RecordSince(t time.Time)

func (*Histogram) Rotate

func (h *Histogram) Rotate()

func (*Histogram) String

func (h *Histogram) String() string

type Rate

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

func (*Rate) Export

func (r *Rate) Export() exportedMetric

func (*Rate) Measure

func (r *Rate) Measure(eventCount int64)

func (*Rate) Name

func (m *Rate) Name() string

func (*Rate) Reset

func (r *Rate) Reset()

func (*Rate) String

func (r *Rate) String() string

type Registry

type Registry interface {
	Factory
	String() string
	ExportAll() map[string]exportedMetric
	PeriodicallyRotate(ctx context.Context, logger log.Logger) govnr.ShutdownWaiter
	ExportPrometheus() string
	WithVirtualChainId(id primitives.VirtualChainId) Registry
	WithNodeAddress(nodeAddress primitives.NodeAddress) Registry
	Remove(metric metric)
}

type Text added in v0.7.1

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

func (*Text) Export added in v0.7.1

func (t *Text) Export() exportedMetric

func (*Text) Name added in v0.7.1

func (m *Text) Name() string

func (*Text) String added in v0.7.1

func (t *Text) String() string

func (*Text) Update added in v0.7.1

func (t *Text) Update(value string)

func (*Text) Value added in v0.7.1

func (t *Text) Value() string

Jump to

Keyboard shortcuts

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