Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Pools []InstancePoolConfig `config:"pools" validate:"required,dive"`
}
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) Run ¶
Run runs all instance pools. Run blocks until fail happen, or all pools subroutines are successfully finished. Ctx will be ancestor to Contexts passed to AmmoQueue, Gun and Aggregator. That's ctx cancel cancels shooting and it's Context values can be used for communication between plugins.
type InstancePoolConfig ¶
type InstancePoolConfig struct {
ID string
Provider core.Provider `config:"ammo" validate:"required"`
Aggregator core.Aggregator `config:"result" validate:"required"`
NewGun func() (core.Gun, error) `config:"gun" validate:"required"`
RPSPerInstance bool `config:"rps-per-instance"`
NewRPSSchedule func() (core.Schedule, error) `config:"rps" validate:"required"`
StartupSchedule core.Schedule `config:"startup" validate:"required"`
}
type Metrics ¶
type Metrics struct {
Request *monitoring.Counter
Response *monitoring.Counter
InstanceStart *monitoring.Counter
InstanceFinish *monitoring.Counter
}
TODO(skipor): use something github.com/rcrowley/go-metrics based. Its high level primitives like Meter can be not fast enough, but EWMAs and Counters should good for that.
Click to show internal directories.
Click to hide internal directories.