Versions in this module Expand all Collapse all v1 v1.7.1 Jan 17, 2022 v1.6.0 Aug 5, 2021 Changes in this version + var ErrParsingRampUpRate = errors.New("ratelimiter: invalid format of rampUpRate, try \"1\" or \"1/1s\"") + var Events = EventBus.New() + func GetCurrentCPUUsage() float64 + func MD5(slice ...string) string + func Now() int64 + func RecordFailure(requestType, name string, responseTime int64, exception string) + func RecordSuccess(requestType, name string, responseTime int64, responseLength int64) + func Run(tasks ...*Task) + func StartCPUProfile(file string, duration time.Duration) (err error) + func StartMemoryProfile(file string, duration time.Duration) (err error) + type Boomer struct + func NewBoomer(masterHost string, masterPort int) *Boomer + func NewStandaloneBoomer(spawnCount int, spawnRate float64) *Boomer + func (b *Boomer) AddOutput(o Output) + func (b *Boomer) EnableCPUProfile(cpuProfile string, duration time.Duration) + func (b *Boomer) EnableMemoryProfile(memoryProfile string, duration time.Duration) + func (b *Boomer) Quit() + func (b *Boomer) RecordFailure(requestType, name string, responseTime int64, exception string) + func (b *Boomer) RecordSuccess(requestType, name string, responseTime int64, responseLength int64) + func (b *Boomer) Run(tasks ...*Task) + func (b *Boomer) SetMode(mode Mode) + func (b *Boomer) SetRateLimiter(rateLimiter RateLimiter) + type ConsoleOutput struct + func NewConsoleOutput() *ConsoleOutput + func (o *ConsoleOutput) OnEvent(data map[string]interface{}) + func (o *ConsoleOutput) OnStart() + func (o *ConsoleOutput) OnStop() + type Mode int + const DistributedMode + const StandaloneMode + type Output interface + OnEvent func(data map[string]interface{}) + OnStart func() + OnStop func() + type RampUpRateLimiter struct + func NewRampUpRateLimiter(maxThreshold int64, rampUpRate string, refillPeriod time.Duration) (rateLimiter *RampUpRateLimiter, err error) + func (limiter *RampUpRateLimiter) Acquire() (blocked bool) + func (limiter *RampUpRateLimiter) Start() + func (limiter *RampUpRateLimiter) Stop() + type RateLimiter interface + Acquire func() bool + Start func() + Stop func() + type StableRateLimiter struct + func NewStableRateLimiter(threshold int64, refillPeriod time.Duration) (rateLimiter *StableRateLimiter) + func (limiter *StableRateLimiter) Acquire() (blocked bool) + func (limiter *StableRateLimiter) Start() + func (limiter *StableRateLimiter) Stop() + type Task struct + Fn func() + Name string + Weight int + type TaskSet interface + AddTask func(task *Task) + GetWeight func() (weight int) + Run func() + SetWeight func(weight int) + type WeighingTaskSet struct + func NewWeighingTaskSet() *WeighingTaskSet + func (ts *WeighingTaskSet) AddTask(task *Task) + func (ts *WeighingTaskSet) GetTask(roll int) (task *Task) + func (ts *WeighingTaskSet) GetWeight() (weight int) + func (ts *WeighingTaskSet) Run() + func (ts *WeighingTaskSet) SetWeight(weight int)