Documentation ¶
Index ¶
- type ExecutionScheduler
- func (e *ExecutionScheduler) GetExecutionPlan() []lib.ExecutionStep
- func (e *ExecutionScheduler) GetExecutorConfigs() []lib.ExecutorConfig
- func (e *ExecutionScheduler) GetExecutors() []lib.Executor
- func (e *ExecutionScheduler) GetInitProgressBar() *pb.ProgressBar
- func (e *ExecutionScheduler) GetRunner() lib.Runner
- func (e *ExecutionScheduler) GetState() *lib.ExecutionState
- func (e *ExecutionScheduler) Init(ctx context.Context, samplesOut chan<- stats.SampleContainer) error
- func (e *ExecutionScheduler) Run(globalCtx, runCtx context.Context, engineOut chan<- stats.SampleContainer) error
- func (e *ExecutionScheduler) SetPaused(pause bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecutionScheduler ¶ added in v0.27.0
type ExecutionScheduler struct {
// contains filtered or unexported fields
}
ExecutionScheduler is the local implementation of lib.ExecutionScheduler
func NewExecutionScheduler ¶ added in v0.27.0
NewExecutionScheduler creates and returns a new local lib.ExecutionScheduler instance, without initializing it beyond the bare minimum. Specifically, it creates the needed executor instances and a lot of state placeholders, but it doesn't initialize the executors and it doesn't initialize or run VUs.
func (*ExecutionScheduler) GetExecutionPlan ¶ added in v0.27.0
func (e *ExecutionScheduler) GetExecutionPlan() []lib.ExecutionStep
GetExecutionPlan is a helper method so users of the local execution scheduler don't have to calculate the execution plan again.
func (*ExecutionScheduler) GetExecutorConfigs ¶ added in v0.27.0
func (e *ExecutionScheduler) GetExecutorConfigs() []lib.ExecutorConfig
GetExecutorConfigs returns the slice of all executor configs, sorted by their (startTime, name) in an ascending order.
func (*ExecutionScheduler) GetExecutors ¶ added in v0.27.0
func (e *ExecutionScheduler) GetExecutors() []lib.Executor
GetExecutors returns the slice of configured executor instances which have work, sorted by their (startTime, name) in an ascending order.
func (*ExecutionScheduler) GetInitProgressBar ¶ added in v0.27.0
func (e *ExecutionScheduler) GetInitProgressBar() *pb.ProgressBar
GetInitProgressBar returns the progress bar associated with the Init function. After the Init is done, it is "hijacked" to display real-time execution statistics as a text bar.
func (*ExecutionScheduler) GetRunner ¶ added in v0.27.0
func (e *ExecutionScheduler) GetRunner() lib.Runner
GetRunner returns the wrapped lib.Runner instance.
func (*ExecutionScheduler) GetState ¶ added in v0.27.0
func (e *ExecutionScheduler) GetState() *lib.ExecutionState
GetState returns a pointer to the execution state struct for the local execution scheduler. It's guaranteed to be initialized and present, though see the documentation in lib/execution.go for caveats about its usage. The most important one is that none of the methods beyond the pause-related ones should be used for synchronization.
func (*ExecutionScheduler) Init ¶ added in v0.27.0
func (e *ExecutionScheduler) Init(ctx context.Context, samplesOut chan<- stats.SampleContainer) error
Init concurrently initializes all of the planned VUs and then sequentially initializes all of the configured executors.
func (*ExecutionScheduler) Run ¶ added in v0.27.0
func (e *ExecutionScheduler) Run(globalCtx, runCtx context.Context, engineOut chan<- stats.SampleContainer) error
Run the ExecutionScheduler, funneling all generated metric samples through the supplied out channel.
func (*ExecutionScheduler) SetPaused ¶ added in v0.27.0
func (e *ExecutionScheduler) SetPaused(pause bool) error
SetPaused pauses a test, if called with true. And if called with false, tries to start/resume it. See the lib.ExecutionScheduler interface documentation of the methods for the various caveats about its usage.