Metric Functions

Back To uAdmin Functions List

In this section, we will cover the following functions in-depth listed below:

uadmin.IncrementMetric

Back To Top

func IncrementMetric(name string)

IncrementMetric increments the value of a.

uadmin.NewMetric

Back To Top

func NewMetric(name string, template string) error

NewMetric creates a new metric.

uadmin.SetMetric

Back To Top

func SetMetric(name string, value float64)

SetMetric sets the value of a gauge metric.

uadmin.SystemMetrics

Back To Top

// Type: bool
var SystemMetrics = false

SystemMetrics enables uAdmin system metrics to be recorded.

uadmin.TimeMetric

Back To Top

func TimeMetric(name string, div float64, f func())

TimeMetric runs a function and times it as a metric.

uadmin.UserMetrics

Back To Top

// Type: bool
var UserMetrics = false

UserMetrics enables the user metrics to be recorded.