Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allocator ¶
type Allocator struct { Stage uint StageName string TrxSet *trx.Set // config.stage.trx Workload []config.ClientGroup // config.stage.workload StageQPS limit.Rate // config.stage.qps StageTPS limit.Rate // config.stage.tps DoneChan chan *client.Client // Stage.doneChan }
Allocator allocate a workload by using configured client groups (config.ClientGroup) to create runnable client groups (workload.ClientGroup) grouped into execution groups. It has two methods that must be called in order: Groups, then Clients. This is done once for each stage in Stage.Prepare.
Allocator modifies Workload.
func (*Allocator) AutoAssign ¶
func (a *Allocator) AutoAssign() []config.ClientGroup
type ClientGroup ¶
type ClientGroup struct { Runtime time.Duration // used by Stage to create a single ctx for all clients in the group DataLimit bool Clients []*client.Client }
ClientGroup is a runnable group of clients created from a config.ClientGroup. It's the return type of Clients, grouped by the execution groups returned by Groups:
[]config.ClientGroup -> Groups -> Clients -> [][]workload.ClientGroup
Click to show internal directories.
Click to hide internal directories.