stats

package
v1.2.15-prerelease13 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package stats is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockQPSTracker added in v1.2.15

type MockQPSTracker struct {
	// contains filtered or unexported fields
}

MockQPSTracker is a mock of QPSTracker interface.

func NewMockQPSTracker added in v1.2.15

func NewMockQPSTracker(ctrl *gomock.Controller) *MockQPSTracker

NewMockQPSTracker creates a new mock instance.

func (*MockQPSTracker) EXPECT added in v1.2.15

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockQPSTracker) QPS added in v1.2.15

func (m *MockQPSTracker) QPS() float64

QPS mocks base method.

func (*MockQPSTracker) ReportCounter added in v1.2.15

func (m *MockQPSTracker) ReportCounter(arg0 int64)

ReportCounter mocks base method.

func (*MockQPSTracker) Start added in v1.2.15

func (m *MockQPSTracker) Start()

Start mocks base method.

func (*MockQPSTracker) Stop added in v1.2.15

func (m *MockQPSTracker) Stop()

Stop mocks base method.

type MockQPSTrackerGroup added in v1.2.15

type MockQPSTrackerGroup struct {
	// contains filtered or unexported fields
}

MockQPSTrackerGroup is a mock of QPSTrackerGroup interface.

func NewMockQPSTrackerGroup added in v1.2.15

func NewMockQPSTrackerGroup(ctrl *gomock.Controller) *MockQPSTrackerGroup

NewMockQPSTrackerGroup creates a new mock instance.

func (*MockQPSTrackerGroup) EXPECT added in v1.2.15

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockQPSTrackerGroup) GroupQPS added in v1.2.15

func (m *MockQPSTrackerGroup) GroupQPS(group string) float64

GroupQPS mocks base method.

func (*MockQPSTrackerGroup) QPS added in v1.2.15

func (m *MockQPSTrackerGroup) QPS() float64

QPS mocks base method.

func (*MockQPSTrackerGroup) ReportCounter added in v1.2.15

func (m *MockQPSTrackerGroup) ReportCounter(arg0 int64)

ReportCounter mocks base method.

func (*MockQPSTrackerGroup) ReportGroup added in v1.2.15

func (m *MockQPSTrackerGroup) ReportGroup(group string, amount int64)

ReportGroup mocks base method.

func (*MockQPSTrackerGroup) Start added in v1.2.15

func (m *MockQPSTrackerGroup) Start()

Start mocks base method.

func (*MockQPSTrackerGroup) Stop added in v1.2.15

func (m *MockQPSTrackerGroup) Stop()

Stop mocks base method.

type MockQPSTrackerGroupMockRecorder added in v1.2.15

type MockQPSTrackerGroupMockRecorder struct {
	// contains filtered or unexported fields
}

MockQPSTrackerGroupMockRecorder is the mock recorder for MockQPSTrackerGroup.

func (*MockQPSTrackerGroupMockRecorder) GroupQPS added in v1.2.15

func (mr *MockQPSTrackerGroupMockRecorder) GroupQPS(group any) *gomock.Call

GroupQPS indicates an expected call of GroupQPS.

func (*MockQPSTrackerGroupMockRecorder) QPS added in v1.2.15

QPS indicates an expected call of QPS.

func (*MockQPSTrackerGroupMockRecorder) ReportCounter added in v1.2.15

func (mr *MockQPSTrackerGroupMockRecorder) ReportCounter(arg0 any) *gomock.Call

ReportCounter indicates an expected call of ReportCounter.

func (*MockQPSTrackerGroupMockRecorder) ReportGroup added in v1.2.15

func (mr *MockQPSTrackerGroupMockRecorder) ReportGroup(group, amount any) *gomock.Call

ReportGroup indicates an expected call of ReportGroup.

func (*MockQPSTrackerGroupMockRecorder) Start added in v1.2.15

Start indicates an expected call of Start.

func (*MockQPSTrackerGroupMockRecorder) Stop added in v1.2.15

Stop indicates an expected call of Stop.

type MockQPSTrackerMockRecorder added in v1.2.15

type MockQPSTrackerMockRecorder struct {
	// contains filtered or unexported fields
}

MockQPSTrackerMockRecorder is the mock recorder for MockQPSTracker.

func (*MockQPSTrackerMockRecorder) QPS added in v1.2.15

QPS indicates an expected call of QPS.

func (*MockQPSTrackerMockRecorder) ReportCounter added in v1.2.15

func (mr *MockQPSTrackerMockRecorder) ReportCounter(arg0 any) *gomock.Call

ReportCounter indicates an expected call of ReportCounter.

func (*MockQPSTrackerMockRecorder) Start added in v1.2.15

func (mr *MockQPSTrackerMockRecorder) Start() *gomock.Call

Start indicates an expected call of Start.

func (*MockQPSTrackerMockRecorder) Stop added in v1.2.15

Stop indicates an expected call of Stop.

type QPSTracker

type QPSTracker interface {
	common.Daemon
	// ReportCounter reports the value of a counter.
	ReportCounter(int64)

	// QPS returns the current queries per second (QPS) value.
	QPS() float64
}

QPSTracker is an interface for reporting statistics related to quotas.

func NewRollingWindowQPSTracker

func NewRollingWindowQPSTracker(timeSource clock.TimeSource, bucketInterval time.Duration, numBuckets int) QPSTracker

type QPSTrackerGroup added in v1.2.15

type QPSTrackerGroup interface {
	QPSTracker

	ReportGroup(group string, amount int64)

	GroupQPS(group string) float64
}

QPSTrackerGroup allows for estimating QPS metrics with an additional dimension

func NewEmaFixedWindowQPSTracker

func NewEmaFixedWindowQPSTracker(timeSource clock.TimeSource, exp float64, bucketInterval time.Duration, baseEvent event.E) QPSTrackerGroup

Jump to

Keyboard shortcuts

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