Versions in this module Expand all Collapse all v0 v0.2.0 Oct 23, 2024 Changes in this version + type ConstWorkerTicker struct + C chan TickValue + N uint + func (c *ConstWorkerTicker) Finish() + func (c *ConstWorkerTicker) Run() + func (c *ConstWorkerTicker) Ticker() <-chan TickValue + type ConstantPacer struct + Freq uint64 + Max uint64 + func (cp *ConstantPacer) Pace(elapsed time.Duration, hits uint64) (time.Duration, bool) + func (cp *ConstantPacer) Rate(elapsed time.Duration) float64 + func (cp *ConstantPacer) String() string + type LineWorkerTicker struct + C chan TickValue + MaxDuration time.Duration + Slope int + Start uint + Stop uint + func (c *LineWorkerTicker) Finish() + func (c *LineWorkerTicker) Run() + func (c *LineWorkerTicker) Ticker() <-chan TickValue + type LinearPacer struct + LoadDuration time.Duration + Max uint64 + Slope int64 + Start ConstantPacer + Stop ConstantPacer + func (p *LinearPacer) Pace(elapsed time.Duration, hits uint64) (time.Duration, bool) + func (p *LinearPacer) Rate(elapsed time.Duration) float64 + func (p *LinearPacer) String() string + type Pacer interface + Pace func(elapsed time.Duration, hits uint64) (wait time.Duration, stop bool) + Rate func(elapsed time.Duration) float64 + type StepPacer struct + LoadDuration time.Duration + Max uint64 + Start ConstantPacer + Step int64 + StepDuration time.Duration + Stop ConstantPacer + func (p *StepPacer) Pace(elapsed time.Duration, hits uint64) (time.Duration, bool) + func (p *StepPacer) Rate(elapsed time.Duration) float64 + func (p *StepPacer) String() string + type StepWorkerTicker struct + C chan TickValue + MaxDuration time.Duration + Start uint + Step int + StepDuration time.Duration + Stop uint + func (c *StepWorkerTicker) Finish() + func (c *StepWorkerTicker) Run() + func (c *StepWorkerTicker) Ticker() <-chan TickValue + type TickValue struct + Delta int + Done bool + type WorkerTicker interface + Finish func() + Run func() + Ticker func() <-chan TickValue