stats

package
v1.2.14-prerelease07 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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