stats

package
v1.2.15-prerelease05 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 7 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

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

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

func (*MockQPSTracker) QPS

func (m *MockQPSTracker) QPS() float64

QPS mocks base method.

func (*MockQPSTracker) ReportCounter

func (m *MockQPSTracker) ReportCounter(arg0 int64)

ReportCounter mocks base method.

func (*MockQPSTracker) Start

func (m *MockQPSTracker) Start()

Start mocks base method.

func (*MockQPSTracker) Stop

func (m *MockQPSTracker) Stop()

Stop mocks base method.

type MockQPSTrackerMockRecorder

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

MockQPSTrackerMockRecorder is the mock recorder for MockQPSTracker.

func (*MockQPSTrackerMockRecorder) QPS

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

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

Jump to

Keyboard shortcuts

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