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 ¶
type MockQPSTracker struct {
// contains filtered or unexported fields
}
MockQPSTracker is a mock of QPSTracker interface.
func NewMockQPSTracker ¶
func NewMockQPSTracker(ctrl *gomock.Controller) *MockQPSTracker
NewMockQPSTracker creates a new mock instance.
func (*MockQPSTracker) EXPECT ¶
func (m *MockQPSTracker) EXPECT() *MockQPSTrackerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockQPSTracker) ReportCounter ¶
func (m *MockQPSTracker) ReportCounter(arg0 int64)
ReportCounter mocks base method.
type MockQPSTrackerMockRecorder ¶
type MockQPSTrackerMockRecorder struct {
// contains filtered or unexported fields
}
MockQPSTrackerMockRecorder is the mock recorder for MockQPSTracker.
func (*MockQPSTrackerMockRecorder) QPS ¶
func (mr *MockQPSTrackerMockRecorder) QPS() *gomock.Call
QPS indicates an expected call of QPS.
func (*MockQPSTrackerMockRecorder) ReportCounter ¶
func (mr *MockQPSTrackerMockRecorder) ReportCounter(arg0 interface{}) *gomock.Call
ReportCounter indicates an expected call of ReportCounter.
func (*MockQPSTrackerMockRecorder) Start ¶
func (mr *MockQPSTrackerMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockQPSTrackerMockRecorder) Stop ¶
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 NewEmaFixedWindowQPSTracker ¶
func NewEmaFixedWindowQPSTracker(timeSource clock.TimeSource, exp float64, bucketInterval time.Duration) QPSTracker
func NewRollingWindowQPSTracker ¶
func NewRollingWindowQPSTracker(timeSource clock.TimeSource, bucketInterval time.Duration, numBuckets int) QPSTracker
Click to show internal directories.
Click to hide internal directories.