Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultRequestNum total default concurrent request DefaultRequestNum uint64 = 10 // Version for -v options Version = "zero" )
Variables ¶
View Source
var ( // ErrorConfigNotFound for error config file not found ErrorConfigNotFound = errors.New("--config file not found--") // ErrorFormatConfigNotValid for invalid format config error ErrorFormatConfigNotValid = errors.New("--format config is not valid--") )
Functions ¶
Types ¶
type Argument ¶
type Argument struct { Method string Config string URL string RequestNum uint64 ShowVersion bool Help func() }
Argument struct
func ParseArgument ¶
ParseArgument for parse argument to Argument
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client http client wrapper
type Config ¶
type Config struct { URL string `json:"url"` Headers map[string]string `json:"headers"` Payload interface{} `json:"payload"` }
Config struct
func LoadConfig ¶
LoadConfig for load config from json file
type Trace ¶
type Trace struct { HTTPResponse *http.Response Duration time.Duration ConnDuration time.Duration // connection setup(DNS lookup + Dial up) duration DNSDuration time.Duration // dns lookup duration ReqDuration time.Duration // request "write" duration ResDuration time.Duration // response "read" duration DelayDuration time.Duration // delay between response and request }
Trace represent the struct of tracing data
Source Files ¶
Click to show internal directories.
Click to hide internal directories.