slapperx

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ready  windowState = 0
	Filled windowState = 1
)

Variables

This section is empty.

Functions

func Main

func Main()

Types

type Config

type Config struct {
	Workers uint
	Timeout time.Duration
	Targets string
	Rate    int64
	MinY    time.Duration
	MaxY    time.Duration
	RampUp  time.Duration
	LogFile string
	Verbose bool
}

func ParseFlags

func ParseFlags() *Config

type MovingWindow added in v1.0.0

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

ring moving window buffer

func (*MovingWindow) Reset added in v1.0.0

func (mw *MovingWindow) Reset()

func (*MovingWindow) ResetSlot added in v1.0.0

func (mw *MovingWindow) ResetSlot(slot int)

type OkBadCounter added in v1.0.0

type OkBadCounter struct {
	Ok  counter
	Bad counter
}

type RampUpController added in v0.3.0

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

func NewRamUpController added in v0.3.0

func NewRamUpController(rampUpTime time.Duration, maxRate int64) *RampUpController

func (*RampUpController) GetRateChanger added in v0.3.0

func (r *RampUpController) GetRateChanger() chan int64

GetRateChanger returns a channel for changing the ticker's rate during operation.

type Stats

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

type StatsResponse added in v0.5.0

type StatsResponse struct {
	ErrorEof         counter
	ErrorTimeout     counter
	ErrorConnRefused counter
	ErrorNoSuchHost  counter
	// contains filtered or unexported fields
}

type Targeter

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

func NewTargeter

func NewTargeter(requests *[]http.Request, timeout time.Duration, logFile string, verbose bool) *Targeter

func (*Targeter) Start

func (trgt *Targeter) Start(workers uint, ticker <-chan time.Time, quit <-chan struct{})

func (*Targeter) Wait added in v0.3.0

func (trgt *Targeter) Wait()

type Ticker added in v0.3.0

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

func NewTicker added in v0.3.0

func NewTicker(rate int64) *Ticker

NewTicker creates a new ticker instance with a given rate and ramp-up time.

func (*Ticker) GetRateChanger added in v0.3.0

func (t *Ticker) GetRateChanger() chan int64

GetRateChanger returns a channel for changing the ticker's rate during operation.

func (*Ticker) Start added in v0.3.0

func (t *Ticker) Start(quit <-chan struct{}) <-chan time.Time

Start initializes the tick process and returns a channel to receive tick events.

type UI

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

func InitTerminal

func InitTerminal(minY time.Duration, maxY time.Duration) *UI

InitTerminal initializes the terminal and sets the UI dimensions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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