benchmark

package
v0.0.0-...-b2ed17c Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OptAttemptCount

func OptAttemptCount(count int) optionFunc

func OptThreadNum

func OptThreadNum(num int) optionFunc

Types

type Client

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

func NewClient

func NewClient() *Client

func (*Client) CheckConnection

func (c *Client) CheckConnection(url string) error

check if the server is running. if the connection time is exceed 10 seconds, return error.

func (*Client) Run

func (c *Client) Run(ctx context.Context, url string, options ...optionFunc) ([]*HttpResult, error)

type HttpResult

type HttpResult struct {
	StatusCode   int
	ContentType  string
	Body         []byte
	ResponseTime time.Duration
}

Jump to

Keyboard shortcuts

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