Versions in this module Expand all Collapse all v0 v0.3.0 Jul 20, 2026 Changes in this version + type Endpoint interface + func NewEndpoint[C any, R any](client Client[C, R], provider DataProvider[C], collector Collector[R]) (Endpoint, error) + type GobCollector struct + func NewGobCollector[R any](filePath string, flushInterval time.Duration, opts ...GobCollectorOption) (*GobCollector[R], error) + func (c *GobCollector[R]) Close() + func (c *GobCollector[R]) CloseAndErr() error + func (c *GobCollector[R]) Collect(result R) + func (c *GobCollector[R]) Err() error + type GobCollectorOption func(*gobCollectorConfig) + func WithGobCollectorBufferSize(size int) GobCollectorOption + func WithGobCollectorGzip(level int) GobCollectorOption + type Phase struct + Duration time.Duration + RPS uint64 + Ramp *Ramp + StartAt time.Duration + Targets []Target + type Ramp struct + Every time.Duration + Step uint64 + To uint64 + type Report struct + Completed uint64 + DrainTimedOut bool + Dropped uint64 + Duration time.Duration + Issued uint64 + Missed uint64 + PeakInFlight uint64 + Scheduled uint64 + SchedulingDuration time.Duration + type Spec struct + DrainTimeout time.Duration + Duration time.Duration + Endpoints map[string]Endpoint + MaxInFlight uint64 + Phases []Phase + Seed uint64 + type Target struct + Endpoint string + Weight uint32 + type Workload struct + func NewWorkload(spec Spec) (*Workload, error) + func (w *Workload) Run(ctx context.Context) Report v0.2.0 Jul 6, 2026 v0.1.3 Dec 2, 2025 Changes in this version + const MIN_INTERVAL v0.1.2 Oct 28, 2025 Changes in this version type PhasePattern + Name string + Weight float64 v0.1.0 Sep 6, 2025 Changes in this version + type CSVCollector struct + func NewCSVCollector[R CSVSerializable](filePath string, flushInterval time.Duration) (*CSVCollector[R], error) + func (c *CSVCollector[R]) Close() + func (c *CSVCollector[R]) Collect(result R) + func (c *CSVCollector[R]) RunFlush() + type CSVSerializable interface + CSVHeaders func() []string + CSVRecord func() []string + type Client interface + CallEndpoint func(ctx context.Context, req C) R + type Collector interface + Close func() + Collect func(result R) + type Config struct + GenerateWorkload bool + MaxDuration time.Duration + Patterns map[string]*PhasePattern + Phases []TestPhase + Seed int64 + type ConstantExecutor struct + func NewConstantExecutor[C any, R any](client Client[C, R], collector Collector[R], dataProvider DataProvider[C]) *ConstantExecutor[C, R] + func (e *ConstantExecutor[C, R]) Execute(ctx context.Context, phase TestPhase) + func (e *ConstantExecutor[C, R]) Stop() + type DataProvider interface + GetData func() C + type EndpointWorkload struct + Client Client[C, R] + Collector Collector[R] + Config *Config + DataProvider DataProvider[C] + Name string + func NewEndpointWorkload[C any, R any](name string, config *Config, client Client[C, R], dataProvider DataProvider[C], ...) (*EndpointWorkload[C, R], error) + func (e *EndpointWorkload[C, R]) Run() + type IntRange struct + Max int + Min int + type LoadExecutor interface + Execute func(ctx context.Context, phase TestPhase) + Stop func() + type PhaseParameters struct + EndRPS IntRange + StartRPS IntRange + Step IntRange + type PhasePattern struct + ConstantLikelihood float64 + Endpoint string + Parameters PhaseParameters + PhaseCount IntRange + RampingLikelihood float64 + type RampingExecutor struct + func NewRampingExecutor[C any, R any](client Client[C, R], collector Collector[R], dataProvider DataProvider[C]) *RampingExecutor[C, R] + func (e *RampingExecutor[C, R]) Execute(ctx context.Context, phase TestPhase) + func (e *RampingExecutor[C, R]) Stop() + type TestPhase struct + Duration time.Duration + EndRPS int + Endpoint string + Name string + StartRPS int + StartTime time.Duration + Step int + Type string + type WorkloadPatternGenerator struct + func NewWorkloadPatternGenerator(seed int64, maxDuration time.Duration, patterns map[string]*PhasePattern) *WorkloadPatternGenerator + func (g *WorkloadPatternGenerator) GenerateWorkload() []TestPhase