Documentation ¶
Overview ¶
Package stats is a generated GoMock package.
Index ¶
- type MockQPSTracker
- type MockQPSTrackerGroup
- func (m *MockQPSTrackerGroup) EXPECT() *MockQPSTrackerGroupMockRecorder
- func (m *MockQPSTrackerGroup) GroupQPS(group string) float64
- func (m *MockQPSTrackerGroup) QPS() float64
- func (m *MockQPSTrackerGroup) ReportCounter(arg0 int64)
- func (m *MockQPSTrackerGroup) ReportGroup(group string, amount int64)
- func (m *MockQPSTrackerGroup) Start()
- func (m *MockQPSTrackerGroup) Stop()
- type MockQPSTrackerGroupMockRecorder
- func (mr *MockQPSTrackerGroupMockRecorder) GroupQPS(group any) *gomock.Call
- func (mr *MockQPSTrackerGroupMockRecorder) QPS() *gomock.Call
- func (mr *MockQPSTrackerGroupMockRecorder) ReportCounter(arg0 any) *gomock.Call
- func (mr *MockQPSTrackerGroupMockRecorder) ReportGroup(group, amount any) *gomock.Call
- func (mr *MockQPSTrackerGroupMockRecorder) Start() *gomock.Call
- func (mr *MockQPSTrackerGroupMockRecorder) Stop() *gomock.Call
- type MockQPSTrackerMockRecorder
- type QPSTracker
- type QPSTrackerGroup
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
func (m *MockQPSTracker) EXPECT() *MockQPSTrackerMockRecorder
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
func (m *MockQPSTrackerGroup) EXPECT() *MockQPSTrackerGroupMockRecorder
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
func (mr *MockQPSTrackerGroupMockRecorder) QPS() *gomock.Call
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
func (mr *MockQPSTrackerGroupMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockQPSTrackerGroupMockRecorder) Stop ¶ added in v1.2.15
func (mr *MockQPSTrackerGroupMockRecorder) Stop() *gomock.Call
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
func (mr *MockQPSTrackerMockRecorder) QPS() *gomock.Call
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
func (mr *MockQPSTrackerMockRecorder) Stop() *gomock.Call
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