workers

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveScenario

type ActiveScenario struct {
	Teardown func()
	// contains filtered or unexported fields
}

func NewActiveScenario

func NewActiveScenario(
	scenario *scenarios.Scenario,
	metricsInstance *metrics.Metrics,
	stats *progress.Stats,
	logger *slog.Logger,
	logrusLogger *logrus.Logger,
) *ActiveScenario

func (*ActiveScenario) Failed

func (s *ActiveScenario) Failed() bool

func (*ActiveScenario) RecordDroppedIteration

func (s *ActiveScenario) RecordDroppedIteration()

func (*ActiveScenario) Run

func (s *ActiveScenario) Run(state *iterationState)

Run performs a single iteration of the test.

func (*ActiveScenario) Setup

func (s *ActiveScenario) Setup()

func (*ActiveScenario) TeardownFailed

func (s *ActiveScenario) TeardownFailed() bool

type ContinuousPool

type ContinuousPool struct {
	// contains filtered or unexported fields
}

func (*ContinuousPool) Start

func (p *ContinuousPool) Start(ctx context.Context)

type PoolManager

type PoolManager struct {
	// contains filtered or unexported fields
}

func New

func New(maxIterations uint64, activeScenario *ActiveScenario) *PoolManager

func (*PoolManager) MaxIterationsReached

func (m *PoolManager) MaxIterationsReached() bool

func (*PoolManager) NewContinuousPool

func (m *PoolManager) NewContinuousPool(numWorkers int) *ContinuousPool

func (*PoolManager) NewTriggerPool

func (m *PoolManager) NewTriggerPool(numWorkers int) *TriggerPool

func (*PoolManager) NextIteration

func (m *PoolManager) NextIteration() (uint64, error)

func (*PoolManager) WaitForCompletion

func (m *PoolManager) WaitForCompletion() <-chan struct{}

type TriggerPool

type TriggerPool struct {
	// contains filtered or unexported fields
}

func (*TriggerPool) Start

func (p *TriggerPool) Start(ctx context.Context) context.Context

func (*TriggerPool) Trigger

func (p *TriggerPool) Trigger(ctx context.Context, numJobs int)

Trigger will trigger the execution of a numJobs in the worker pool, discarding anything that is currently scheduled for execution.

Jump to

Keyboard shortcuts

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