worker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HttpClientNetHTTP   = "nethttp"
	HttpClientNetHTTP3  = "nethttp-3"
	HttpClientFastHTTP1 = "fasthttp-1"
	HttpClientFastHTTP2 = "fasthttp-2"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ResponseCode

type ResponseCode int

type Stats

type Stats struct {
	CompletedReqs int64
	FailedReqs    int64
	Responses     map[ResponseCode]int64
	Errors        map[string]uint
}

type TotalRequestsComplete

type TotalRequestsComplete int64

type Worker

type Worker interface {
	Run(wg *sync.WaitGroup)
	Stats() Stats
	ReqSize() int64
	RespSize() int64
}

func NewWorker

func NewWorker(config *http_clients.Config) (Worker, error)

type WorkerBase

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

func (*WorkerBase) ReqSize

func (w *WorkerBase) ReqSize() int64

func (*WorkerBase) RespSize

func (w *WorkerBase) RespSize() int64

func (*WorkerBase) Stats

func (w *WorkerBase) Stats() Stats

type WorkerFixedReqs

type WorkerFixedReqs struct {
	*WorkerBase
}

func (*WorkerFixedReqs) Run

func (w *WorkerFixedReqs) Run(wg *sync.WaitGroup)

type WorkerFixedTime

type WorkerFixedTime struct {
	*WorkerBase
}

func (*WorkerFixedTime) Run

func (w *WorkerFixedTime) Run(wg *sync.WaitGroup)

type WorkerFixedTimeRequests

type WorkerFixedTimeRequests struct {
	*WorkerBase
}

func (*WorkerFixedTimeRequests) Run

Jump to

Keyboard shortcuts

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