Help us shape the future of Go! Take the 2026 Go Developer Survey

load

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseThresholds

func ParseThresholds(in []string) ([]threshold, error)

ParseThresholds parses expressions such as "p95 < 200ms" and "errorRate < 1%".

Types

type Config

type Config struct {
	VUs        int
	Duration   time.Duration
	Warmup     time.Duration
	RPS        int
	Thresholds []string
	Vars       map[string]any
	Client     *http.Client
	Tag        string
	Timeout    time.Duration
	Env        string
	Suite      *suite.Suite
	Dial       func(context.Context, string, map[string]any) (engine.Link, error)
	NewPage    func(context.Context) (engine.Page, error)
}

type Endpoint

type Endpoint struct {
	Name   string
	Count  int64
	Errors int64
	Stats  Stats
	RPS    float64
}

type Result

type Result struct {
	Started          time.Time
	Elapsed          time.Duration
	VUs              int
	Iterations       int64
	FailedIterations int64
	Requests         int64
	TransportErrors  int64
	Endpoints        []Endpoint
	Thresholds       []Threshold
	Passed           bool
	Failures         []engine.ScenarioResult
	Overall          Stats
}

func Run

func Run(ctx context.Context, f *feature.File, cfg Config) (Result, error)

type Stats

type Stats struct {
	Min  time.Duration
	Max  time.Duration
	Mean time.Duration
	P50  time.Duration
	P95  time.Duration
	P99  time.Duration
}

type Threshold

type Threshold struct {
	Text   string
	Passed bool
	Actual string
}

Jump to

Keyboard shortcuts

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