metricstest

package
v0.0.0-...-02374a7 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertMetrics

func AssertMetrics(t *testing.T, expectedMetrics []string, actualMetrics MockMetrics)

Types

type MockMetrics

type MockMetrics struct {
	mock.Mock
}

func CreateMockMetrics

func CreateMockMetrics() MockMetrics

func (*MockMetrics) Export

func (m *MockMetrics) Export(cfg config.Metrics)

func (*MockMetrics) GetEngineRegistry

func (m *MockMetrics) GetEngineRegistry() interface{}

func (*MockMetrics) GetMetricsEngineName

func (m *MockMetrics) GetMetricsEngineName() string

func (*MockMetrics) RecordAcceptConnectionErrors

func (m *MockMetrics) RecordAcceptConnectionErrors()

func (*MockMetrics) RecordCloseConnectionErrors

func (m *MockMetrics) RecordCloseConnectionErrors()

func (*MockMetrics) RecordConnectionClosed

func (m *MockMetrics) RecordConnectionClosed()

func (*MockMetrics) RecordConnectionOpen

func (m *MockMetrics) RecordConnectionOpen()

func (*MockMetrics) RecordGetBackendDuration

func (m *MockMetrics) RecordGetBackendDuration(duration time.Duration)

func (*MockMetrics) RecordGetBackendError

func (m *MockMetrics) RecordGetBackendError()

func (*MockMetrics) RecordGetBackendTotal

func (m *MockMetrics) RecordGetBackendTotal()

func (*MockMetrics) RecordGetBadRequest

func (m *MockMetrics) RecordGetBadRequest()

func (*MockMetrics) RecordGetDuration

func (m *MockMetrics) RecordGetDuration(duration time.Duration)

func (*MockMetrics) RecordGetError

func (m *MockMetrics) RecordGetError()

func (*MockMetrics) RecordGetTotal

func (m *MockMetrics) RecordGetTotal()

func (*MockMetrics) RecordKeyNotFoundError

func (m *MockMetrics) RecordKeyNotFoundError()

func (*MockMetrics) RecordMissingKeyError

func (m *MockMetrics) RecordMissingKeyError()

func (*MockMetrics) RecordPutBackendDuration

func (m *MockMetrics) RecordPutBackendDuration(duration time.Duration)

func (*MockMetrics) RecordPutBackendError

func (m *MockMetrics) RecordPutBackendError()

func (*MockMetrics) RecordPutBackendInvalid

func (m *MockMetrics) RecordPutBackendInvalid()

func (*MockMetrics) RecordPutBackendJson

func (m *MockMetrics) RecordPutBackendJson()

func (*MockMetrics) RecordPutBackendSize

func (m *MockMetrics) RecordPutBackendSize(sizeInBytes float64)

func (*MockMetrics) RecordPutBackendTTLSeconds

func (m *MockMetrics) RecordPutBackendTTLSeconds(duration time.Duration)

func (*MockMetrics) RecordPutBackendXml

func (m *MockMetrics) RecordPutBackendXml()

func (*MockMetrics) RecordPutBadRequest

func (m *MockMetrics) RecordPutBadRequest()

func (*MockMetrics) RecordPutDuration

func (m *MockMetrics) RecordPutDuration(duration time.Duration)

func (*MockMetrics) RecordPutError

func (m *MockMetrics) RecordPutError()

func (*MockMetrics) RecordPutKeyProvided

func (m *MockMetrics) RecordPutKeyProvided()

func (*MockMetrics) RecordPutTotal

func (m *MockMetrics) RecordPutTotal()

Jump to

Keyboard shortcuts

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