pipeline

package
v0.0.0-...-b770427 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pipeline

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

Pipeline orchestrates the stress test execution

func New

func New(cfg *config.Config) (*Pipeline, error)

New creates a new pipeline instance

func (*Pipeline) Close

func (p *Pipeline) Close()

Close cleans up pipeline resources

func (*Pipeline) Execute

func (p *Pipeline) Execute(ctx context.Context) (*Result, error)

Execute runs the complete stress test pipeline

func (*Pipeline) WithRunConfig

func (p *Pipeline) WithRunConfig(runCfg *RunConfig) *Pipeline

WithRunConfig sets the run configuration

type Result

type Result struct {
	// Execution info
	StartTime time.Time
	EndTime   time.Time
	Duration  time.Duration

	// Stage results
	StageResults []*StageResult

	// Summary
	TotalTransactions int
	SuccessfulTxs     int
	FailedTxs         int
	TimeoutTxs        int

	// Performance metrics
	TPS          float64
	ConfirmedTPS float64
	AvgLatency   time.Duration
	P95Latency   time.Duration
	P99Latency   time.Duration

	// Gas metrics
	TotalGasUsed uint64
	TotalGasCost string

	// Detailed report
	Report *collector.Report

	// Errors encountered
	Errors []error
}

Result represents the complete pipeline execution result

func NewResult

func NewResult() *Result

NewResult creates a new pipeline result

func (*Result) AddStageResult

func (r *Result) AddStageResult(sr *StageResult)

AddStageResult adds a stage result

func (*Result) Finalize

func (r *Result) Finalize()

Finalize completes the result

func (*Result) Success

func (r *Result) Success() bool

Success returns true if all stages succeeded

type RunConfig

type RunConfig struct {
	// Skip distribution if accounts already funded
	SkipDistribution bool

	// Skip collection (fire-and-forget mode)
	SkipCollection bool

	// Export report to files
	ExportReport bool

	// Output directory for reports
	OutputDir string

	// Use streaming mode instead of batch mode
	StreamingMode bool

	// Rate limit for streaming mode (tx/s)
	StreamingRate float64

	// Dry run (build transactions but don't send)
	DryRun bool
}

RunConfig holds runtime configuration for the pipeline

func DefaultRunConfig

func DefaultRunConfig() *RunConfig

DefaultRunConfig returns default run configuration

type Stage

type Stage int

Stage represents a pipeline stage

const (
	StageInit Stage = iota
	StageDistribute
	StageBuild
	StageSend
	StageCollect
	StageReport
	StageComplete
)

func (Stage) String

func (s Stage) String() string

type StageResult

type StageResult struct {
	Stage    Stage
	Success  bool
	Duration time.Duration
	Message  string
	Error    error
}

StageResult represents the result of a pipeline stage

Jump to

Keyboard shortcuts

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