loadgen

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 20 Imported by: 1

Documentation

Overview

Package loadgen implements load generator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run added in v0.1.1

func Run(lf Flags, jobProducer JobProducer) error

Run runs load testing.

Types

type Flags

type Flags struct {
	Number       int
	Concurrency  int
	RateLimit    int
	Duration     time.Duration
	SlowResponse time.Duration
	LiveUI       bool

	Output io.Writer
}

Flags control load testing.

func (*Flags) Prepare added in v0.2.7

func (lf *Flags) Prepare()

Prepare sets conditional defaults.

func (*Flags) Register added in v0.3.1

func (lf *Flags) Register()

Register sets up flags as command line options.

type JobProducer added in v0.1.1

type JobProducer interface {
	Job(i int) (time.Duration, error)
	RequestCounts() map[string]int
}

JobProducer produces load items.

Jump to

Keyboard shortcuts

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