Metric Functions¶
In this section, we will cover the following functions in-depth listed below:
- uadmin.IncrementMetric
- uadmin.NewMetric
- uadmin.SetMetric
- uadmin.SystemMetrics
- uadmin.TimeMetric
- uadmin.UserMetrics
uadmin.IncrementMetric¶
func IncrementMetric(name string)
IncrementMetric increments the value of a.
uadmin.NewMetric¶
func NewMetric(name string, template string) error
NewMetric creates a new metric.
uadmin.SetMetric¶
func SetMetric(name string, value float64)
SetMetric sets the value of a gauge metric.
uadmin.SystemMetrics¶
// Type: bool
var SystemMetrics = false
SystemMetrics enables uAdmin system metrics to be recorded.
uadmin.TimeMetric¶
func TimeMetric(name string, div float64, f func())
TimeMetric runs a function and times it as a metric.
uadmin.UserMetrics¶
// Type: bool
var UserMetrics = false
UserMetrics enables the user metrics to be recorded.