runner

package
v0.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package runner provides runner implementations for running testcases at load.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MasterAbort added in v0.0.8

func MasterAbort()

MasterAbort will prevent any further runners from executing Runners already in progress will complete normally, but any runners not yet started will do nothing (won't run any operations, but otherwise still behave normally) Use with extreme caution. The only real use is to cancel execution of downstream runners after some kind of failed set-up test

func NewDelegateRunner

func NewDelegateRunner(name string, testCase loadtest.Test, registry *runnerRegistry, maxInProgress int, bhca int) *delegateRunner

NewDelegateRunner creates a new delegate runner

func NewInitialRunner

func NewInitialRunner(name string, testCase loadtest.Test, registry *runnerRegistry, maxInProgress int, bhca int, iterations int) *initialRunner

NewInitialRunner creats a new initial runner

func NewRunnerRegistry added in v0.0.14

func NewRunnerRegistry() *runnerRegistry

NewRunnerRegistry will return a new runner registry

Types

type WorkProvider

type WorkProvider interface {
	// WorkReamining must return true if there is no more work to do
	WorkRemaining() bool

	// GetWork must provide the next work item, or nil if there is no more work to do
	GetWork() *loadtest.TestContext

	// Remaining should provide the remaining (un-started) test count, if known
	// if not known, nil
	GetRemainingCount() *int

	// AddWork is used to schedule a retry of a test, if needed
	// If the runner cannot do the retry, it should return an error
	// (initial runners for example, are fixed load and cannot do retries)
	AddWork(ctx *loadtest.TestContext) error
}

WorkProvider is used to provide work to a runner

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL