Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatOutput ¶
func FormatOutput(stats *http.LoadTestStats, config *BenchConfig) error
FormatOutput writes results in requested format
func RunBench ¶
func RunBench(config *BenchConfig) error
RunBench executes the load test with given configuration
Types ¶
type BenchConfig ¶
type BenchConfig struct {
// Target configuration
URL string
Method string
Body string
// Headers (parsed from repeated -H flags)
Headers map[string]string
// Load parameters
Concurrency int
Duration time.Duration
TotalRequests int
// Performance tuning
Timeout time.Duration
RateLimit int // requests per second, 0 = unlimited
KeepAlive bool
// Output options
Quiet bool
JSON bool
Output string // file path for output
}
BenchConfig holds parsed CLI flags for benchmarking
func ParseBenchFlags ¶
func ParseBenchFlags(args []string) (*BenchConfig, error)
ParseBenchFlags parses command-line flags for bench subcommand
func (*BenchConfig) Validate ¶
func (c *BenchConfig) Validate() error
Validate checks BenchConfig for errors
Click to show internal directories.
Click to hide internal directories.