benchmark

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReqBench

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

ReqBench is a request benchmark config

func New

func New() *ReqBench

New to start a benchmark test

func (*ReqBench) Concurrent

func (rb *ReqBench) Concurrent(c int) *ReqBench

Concurrent to set total concurrent connections to use

func (*ReqBench) DELETE

func (rb *ReqBench) DELETE(p string) *ReqBench

DELETE request method

func (*ReqBench) Duration

func (rb *ReqBench) Duration(d int) *ReqBench

Duration to set the number of seconds to run the benchmark

func (*ReqBench) GET

func (rb *ReqBench) GET(p string) *ReqBench

GET request method

func (*ReqBench) HEAD

func (rb *ReqBench) HEAD(p string) *ReqBench

HEAD request method

func (*ReqBench) OPTIONS

func (rb *ReqBench) OPTIONS(p string) *ReqBench

OPTIONS request method

func (*ReqBench) PATCH

func (rb *ReqBench) PATCH(p string) *ReqBench

PATCH request method

func (*ReqBench) POST

func (rb *ReqBench) POST(p string) *ReqBench

POST request method

func (*ReqBench) PUT

func (rb *ReqBench) PUT(p string) *ReqBench

PUT request method

func (*ReqBench) Pipeline

func (rb *ReqBench) Pipeline(p int) *ReqBench

Pipeline to set the number of pipelined requests to use

func (*ReqBench) Run

func (rb *ReqBench) Run()

Run to start a benchmark test

func (*ReqBench) SendFile

func (rb *ReqBench) SendFile(fn, path string) *ReqBench

SendFile (fieldName, filepath string)

to send file from filepath

func (*ReqBench) SendFormData

func (rb *ReqBench) SendFormData(h ujihttp.H) *ReqBench

SendFormData to send multipart/form-data

func (*ReqBench) SendJSON

func (rb *ReqBench) SendJSON(j ujihttp.JSON) *ReqBench

SendJSON to send json data

func (*ReqBench) SendMultipleFile

func (rb *ReqBench) SendMultipleFile(fn string, path []string) *ReqBench

SendMultipleFile (fieldName, filepath string)

Use [] on the fieldname to send multiple file from filepath

func (*ReqBench) Timeout

func (rb *ReqBench) Timeout(t int) *ReqBench

Timeout to set the number of timout requests

func (*ReqBench) WithContentType

func (rb *ReqBench) WithContentType(ct string) *ReqBench

WithContentType to set content-type request

func (*ReqBench) WithCookies

func (rb *ReqBench) WithCookies(h ujihttp.H) *ReqBench

WithCookies to set cookies request

func (*ReqBench) WithHeader

func (rb *ReqBench) WithHeader(h ujihttp.H) *ReqBench

WithHeader to set header request

Jump to

Keyboard shortcuts

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