metricstest

package
v0.16.14 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockMetrics

type MockMetrics struct {
	Prefix string

	Now time.Time
	// contains filtered or unexported fields
}

func (*MockMetrics) Gauge added in v0.11.7

func (m *MockMetrics) Gauge(key string) (v float64, ok bool)

func (*MockMetrics) IncCounter

func (m *MockMetrics) IncCounter(key string)

func (*MockMetrics) IncCounterBy

func (m *MockMetrics) IncCounterBy(key string, value int64)

func (*MockMetrics) IncErrorsBackend

func (*MockMetrics) IncErrorsBackend(routeId string)

func (*MockMetrics) IncErrorsStreaming

func (*MockMetrics) IncErrorsStreaming(routeId string)

func (*MockMetrics) IncFloatCounterBy added in v0.10.153

func (m *MockMetrics) IncFloatCounterBy(key string, value float64)

func (*MockMetrics) IncRoutingFailures

func (*MockMetrics) IncRoutingFailures()

func (*MockMetrics) MeasureAllFiltersRequest

func (*MockMetrics) MeasureAllFiltersRequest(routeId string, start time.Time)

func (*MockMetrics) MeasureAllFiltersResponse

func (*MockMetrics) MeasureAllFiltersResponse(routeId string, start time.Time)

func (*MockMetrics) MeasureBackend

func (*MockMetrics) MeasureBackend(routeId string, start time.Time)

func (*MockMetrics) MeasureBackend5xx

func (*MockMetrics) MeasureBackend5xx(t time.Time)

func (*MockMetrics) MeasureBackendHost

func (*MockMetrics) MeasureBackendHost(routeBackendHost string, start time.Time)

func (*MockMetrics) MeasureFilterRequest

func (*MockMetrics) MeasureFilterRequest(filterName string, start time.Time)

func (*MockMetrics) MeasureFilterResponse

func (*MockMetrics) MeasureFilterResponse(filterName string, start time.Time)

func (*MockMetrics) MeasureResponse

func (*MockMetrics) MeasureResponse(code int, method string, routeId string, start time.Time)

func (*MockMetrics) MeasureRouteLookup

func (*MockMetrics) MeasureRouteLookup(start time.Time)

func (*MockMetrics) MeasureServe

func (*MockMetrics) MeasureServe(routeId, host, method string, code int, start time.Time)

func (*MockMetrics) MeasureSince

func (m *MockMetrics) MeasureSince(key string, start time.Time)

func (*MockMetrics) RegisterHandler

func (*MockMetrics) RegisterHandler(path string, handler *http.ServeMux)

func (*MockMetrics) UpdateGauge

func (m *MockMetrics) UpdateGauge(key string, value float64)

func (*MockMetrics) WithCounters added in v0.10.153

func (m *MockMetrics) WithCounters(f func(counters map[string]int64))

func (*MockMetrics) WithFloatCounters added in v0.10.153

func (m *MockMetrics) WithFloatCounters(f func(floatCounters map[string]float64))

func (*MockMetrics) WithGauges added in v0.11.7

func (m *MockMetrics) WithGauges(f func(map[string]float64))

func (*MockMetrics) WithMeasures added in v0.10.153

func (m *MockMetrics) WithMeasures(f func(measures map[string][]time.Duration))

Jump to

Keyboard shortcuts

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