Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultWindowSize = 1000 DefaultBpsScale = 8000 DefaultWindowItems = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RateCalculator ¶
type RateCalculator struct {
// contains filtered or unexported fields
}
func NewRateCalculator ¶
func (RateCalculator) GetBytes ¶
func (p RateCalculator) GetBytes() int64
func (*RateCalculator) GetRate ¶
func (p *RateCalculator) GetRate(nowMs int64) uint32
func (*RateCalculator) Update ¶
func (p *RateCalculator) Update(size int, nowMs int64)
Click to show internal directories.
Click to hide internal directories.