This section is empty.


This section is empty.


This section is empty.


type ExecutionScheduler

type ExecutionScheduler struct {
	// contains filtered or unexported fields

    ExecutionScheduler is the local implementation of lib.ExecutionScheduler

    func NewExecutionScheduler

    func NewExecutionScheduler(runner lib.Runner, logger *logrus.Logger) (*ExecutionScheduler, error)

      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

      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

        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

          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

            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

              func (e *ExecutionScheduler) GetRunner() lib.Runner

                GetRunner returns the wrapped lib.Runner instance.

                func (*ExecutionScheduler) GetState

                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

                  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

                    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

                      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.

                        Source Files