Documentation ¶
Index ¶
- Constants
- func NewRegistry(updater Updater) metrics.Registry
- type Counter
- type Gauge
- type GaugeFloat64
- type Histogram
- type Meter
- type MetricsAPI
- func (api *MetricsAPI) All() map[string]map[string]interface{}
- func (api *MetricsAPI) ClearCounter(name string)
- func (api *MetricsAPI) ClearHistogram(name string)
- func (api *MetricsAPI) DecCounter(name string, i int64)
- func (api *MetricsAPI) DecGauge(name string, i int64)
- func (api *MetricsAPI) Get(name string) map[string]interface{}
- func (api *MetricsAPI) IncCounter(name string, i int64)
- func (api *MetricsAPI) IncGauge(name string, i int64)
- func (api *MetricsAPI) List() []string
- func (api *MetricsAPI) MarkMeter(name string, n int64)
- func (api *MetricsAPI) MarkPercentage(name string, marked bool)
- func (api *MetricsAPI) MarkTimeWindowPercentage(name string, marked bool, slots int, slotIntervalNanos int64)
- func (api *MetricsAPI) MarkTimeWindowPercentageDefault(name string, marked bool)
- func (api *MetricsAPI) StopMeter(name string)
- func (api *MetricsAPI) StopTimer(name string)
- func (api *MetricsAPI) UpdateGauge(name string, v int64)
- func (api *MetricsAPI) UpdateGaugeFloat64(name string, v float64)
- func (api *MetricsAPI) UpdateHistogram(name string, v int64)
- func (api *MetricsAPI) UpdateTimer(name string, v int64)
- type Percentage
- type Registry
- func (r *Registry) GetOrRegisterCounter(name string, args ...interface{}) metrics.Counter
- func (r *Registry) GetOrRegisterGauge(name string, args ...interface{}) metrics.Gauge
- func (r *Registry) GetOrRegisterGaugeFloat64(name string, args ...interface{}) metrics.GaugeFloat64
- func (r *Registry) GetOrRegisterHistogram(name string, args ...interface{}) metrics.Histogram
- func (r *Registry) GetOrRegisterMeter(name string, args ...interface{}) metrics.Meter
- func (r *Registry) GetOrRegisterPercentage(name string, args ...interface{}) infuraMetrics.Percentage
- func (r *Registry) GetOrRegisterTimeWindowPercentage(slots int, slotInterval time.Duration, name string, args ...interface{}) infuraMetrics.Percentage
- func (r *Registry) GetOrRegisterTimeWindowPercentageDefault(name string, args ...interface{}) infuraMetrics.Percentage
- func (r *Registry) GetOrRegisterTimer(name string, args ...interface{}) metrics.Timer
- type TimeWindowPercentage
- type Timer
- type Updater
Constants ¶
View Source
const Namespace = "metrics"
Variables ¶
This section is empty.
Functions ¶
func NewRegistry ¶
Types ¶
type GaugeFloat64 ¶
type GaugeFloat64 struct { metrics.GaugeFloat64 // contains filtered or unexported fields }
GaugeFloat64
func (*GaugeFloat64) Update ¶
func (gauge *GaugeFloat64) Update(v float64)
type MetricsAPI ¶
type MetricsAPI struct{}
func (*MetricsAPI) All ¶
func (api *MetricsAPI) All() map[string]map[string]interface{}
func (*MetricsAPI) DecCounter ¶
func (api *MetricsAPI) DecCounter(name string, i int64)
func (*MetricsAPI) DecGauge ¶
func (api *MetricsAPI) DecGauge(name string, i int64)
func (*MetricsAPI) Get ¶
func (api *MetricsAPI) Get(name string) map[string]interface{}
func (*MetricsAPI) IncCounter ¶
func (api *MetricsAPI) IncCounter(name string, i int64)
func (*MetricsAPI) IncGauge ¶
func (api *MetricsAPI) IncGauge(name string, i int64)
func (*MetricsAPI) MarkPercentage ¶
func (api *MetricsAPI) MarkPercentage(name string, marked bool)
Percentage
func (*MetricsAPI) MarkTimeWindowPercentage ¶
func (api *MetricsAPI) MarkTimeWindowPercentage(name string, marked bool, slots int, slotIntervalNanos int64)
func (*MetricsAPI) MarkTimeWindowPercentageDefault ¶
func (api *MetricsAPI) MarkTimeWindowPercentageDefault(name string, marked bool)
TimeWindowPercentage
func (*MetricsAPI) StopMeter ¶
func (api *MetricsAPI) StopMeter(name string)
func (*MetricsAPI) StopTimer ¶
func (api *MetricsAPI) StopTimer(name string)
func (*MetricsAPI) UpdateGaugeFloat64 ¶
func (api *MetricsAPI) UpdateGaugeFloat64(name string, v float64)
GaugeFloat64
func (*MetricsAPI) UpdateHistogram ¶
func (api *MetricsAPI) UpdateHistogram(name string, v int64)
type Percentage ¶
type Percentage struct { infuraMetrics.Percentage // contains filtered or unexported fields }
Percentage
func (*Percentage) Mark ¶
func (p *Percentage) Mark(marked bool)
type Registry ¶
func (*Registry) GetOrRegisterCounter ¶
func (*Registry) GetOrRegisterGauge ¶
func (*Registry) GetOrRegisterGaugeFloat64 ¶
func (r *Registry) GetOrRegisterGaugeFloat64(name string, args ...interface{}) metrics.GaugeFloat64
func (*Registry) GetOrRegisterHistogram ¶
func (*Registry) GetOrRegisterMeter ¶
func (*Registry) GetOrRegisterPercentage ¶
func (r *Registry) GetOrRegisterPercentage(name string, args ...interface{}) infuraMetrics.Percentage
func (*Registry) GetOrRegisterTimeWindowPercentage ¶
func (r *Registry) GetOrRegisterTimeWindowPercentage(slots int, slotInterval time.Duration, name string, args ...interface{}) infuraMetrics.Percentage
func (*Registry) GetOrRegisterTimeWindowPercentageDefault ¶
func (r *Registry) GetOrRegisterTimeWindowPercentageDefault(name string, args ...interface{}) infuraMetrics.Percentage
type TimeWindowPercentage ¶
type TimeWindowPercentage struct { infuraMetrics.Percentage // contains filtered or unexported fields }
TimeWindowPercentage
func (*TimeWindowPercentage) Mark ¶
func (p *TimeWindowPercentage) Mark(marked bool)
type Updater ¶
type Updater interface { ClearCounter(name string) DecCounter(name string, i int64) IncCounter(name string, i int64) UpdateGauge(name string, v int64) DecGauge(name string, i int64) IncGauge(name string, i int64) UpdateGaugeFloat64(name string, v float64) MarkMeter(name string, n int64) StopMeter(name string) ClearHistogram(name string) UpdateHistogram(name string, v int64) UpdateTimer(name string, v int64) StopTimer(name string) MarkPercentage(name string, marked bool) MarkTimeWindowPercentageDefault(name string, marked bool) MarkTimeWindowPercentage(name string, marked bool, slots int, slotIntervalNanos int64) }
Click to show internal directories.
Click to hide internal directories.