httpt

package module
v0.0.0-...-04b0b85 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: MIT Imports: 14 Imported by: 0

README

DRAFT STAGE

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	Config *RunnerConfig
	// Used for initializing groups,
	// all groups are initialized then close PauseC,
	// mean terminate paused status.
	PauseC                chan struct{}
	CancelC               chan struct{}
	MetricC               chan<- *metric.Metric
	AllGroupsDone         <-chan struct{}
	MetricCollectorsDoneC <-chan struct{}
}

func NewRunner

func NewRunner(cfg *RunnerConfig) (*Runner, error)

func (*Runner) Run

func (r *Runner) Run()

type RunnerConfig

type RunnerConfig struct {
	// Duration to run,
	// 0 mean no limit.
	Duration time.Duration
	Groups   []*RunnerGroup
	Metric   RunnerMetric
}

type RunnerGroup

type RunnerGroup struct {
	// If func return error then will auto call Param.Error().
	RunFunc runfunc.Func
	// Number of `RunFunc` run concurrently.
	Number int
	// 0 mean no limit.
	MaxRPS float64
	// Fixed iterations of `RunFunc` run.
	Iteration int
	// contains filtered or unexported fields
}

type RunnerMetric

type RunnerMetric struct {
	// All are disabled by default, manually enable if required.
	EnableDefaultRequestMetrics map[metric.DefaultRequestMetric]bool
	MetricCollectors            []metric.Collector
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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