Documentation ¶
Index ¶
- Constants
- func Execute()
- func FileContent(filename string) string
- func FutureUnixMilli(interval int) int64
- func HeaderInstance() *headers
- func LinesFromFile(file string) []string
- func Logger() *logger
- func Logo() string
- func NewLogger() *logger
- func NewQueue(limit int) queue
- func NowUnixMilli() int64
- func ParseHeaders(args Arguments) *headers
- func PrintStats(stats Statistics) string
- func RandomSlice(hosts []string) string
- func Request(hosts []string, args Arguments, stats Statistics)
- type Arguments
- func (flags *Arguments) Bytes() int
- func (flags *Arguments) Concurrent() int
- func (flags *Arguments) HTTPMethod() string
- func (flags *Arguments) Headers() []string
- func (flags *Arguments) Hosts() []string
- func (flags *Arguments) Interval() int
- func (flags *Arguments) IsJSONPayload() bool
- func (flags *Arguments) JSONPayload() []byte
- func (flags *Arguments) Logger() bool
- func (flags *Arguments) Proxy() string
- func (flags *Arguments) RequestType() string
- func (flags *Arguments) Requests() int
- type Statistics
- type TotalStatistics
- func (stats *TotalStatistics) DataTransferred() int
- func (stats *TotalStatistics) ElapsedTime() int64
- func (stats *TotalStatistics) Failure() int64
- func (stats *TotalStatistics) Longest() int64
- func (stats *TotalStatistics) ResponseTime() int
- func (stats *TotalStatistics) SetDataTransferred(dataTransferred int)
- func (stats *TotalStatistics) SetElapsedTime(elapsedTime int64)
- func (stats *TotalStatistics) SetFailure(failed int64)
- func (stats *TotalStatistics) SetLongest(longest int64)
- func (stats *TotalStatistics) SetResponseTime(responseTime int64)
- func (stats *TotalStatistics) SetShortest(shortest int64)
- func (stats *TotalStatistics) SetSuccessful(successful int64)
- func (stats *TotalStatistics) SetTotal(total int64)
- func (stats *TotalStatistics) Shortest() int64
- func (stats *TotalStatistics) Successful() int64
- func (stats *TotalStatistics) Total() int64
Constants ¶
View Source
const (
PATTERN = "([a-zA-Z0-9-]+)[^*](.*)"
)
This will match <first-group>:<second-group> of a header Test it here https://regex101.com/r/cn0QvY/1
Variables ¶
This section is empty.
Functions ¶
func FileContent ¶
func FutureUnixMilli ¶
func HeaderInstance ¶ added in v1.7.0
func HeaderInstance() *headers
func LinesFromFile ¶
func NowUnixMilli ¶
func NowUnixMilli() int64
func ParseHeaders ¶
func ParseHeaders(args Arguments) *headers
func PrintStats ¶
func PrintStats(stats Statistics) string
func RandomSlice ¶
func Request ¶
func Request(hosts []string, args Arguments, stats Statistics)
Types ¶
type Arguments ¶
type Arguments struct {
// contains filtered or unexported fields
}
func (*Arguments) Concurrent ¶
func (*Arguments) HTTPMethod ¶
func (*Arguments) IsJSONPayload ¶
func (*Arguments) JSONPayload ¶
func (*Arguments) RequestType ¶
type Statistics ¶
type Statistics interface { SetTotal(totalt int64) Total() int64 SetSuccessful(successful int64) Successful() int64 SetFailure(failed int64) Failure() int64 SetShortest(shortest int64) Shortest() int64 SetLongest(longest int64) Longest() int64 SetElapsedTime(elapsedTime int64) ElapsedTime() int64 SetResponseTime(responseTime int64) ResponseTime() int SetDataTransferred(dataTransferred int) DataTransferred() int }
type TotalStatistics ¶
type TotalStatistics struct {
// contains filtered or unexported fields
}
func NewStatistics ¶
func NewStatistics() TotalStatistics
func (*TotalStatistics) DataTransferred ¶
func (stats *TotalStatistics) DataTransferred() int
func (*TotalStatistics) ElapsedTime ¶
func (stats *TotalStatistics) ElapsedTime() int64
func (*TotalStatistics) Failure ¶
func (stats *TotalStatistics) Failure() int64
func (*TotalStatistics) Longest ¶
func (stats *TotalStatistics) Longest() int64
func (*TotalStatistics) ResponseTime ¶
func (stats *TotalStatistics) ResponseTime() int
func (*TotalStatistics) SetDataTransferred ¶
func (stats *TotalStatistics) SetDataTransferred(dataTransferred int)
func (*TotalStatistics) SetElapsedTime ¶
func (stats *TotalStatistics) SetElapsedTime(elapsedTime int64)
func (*TotalStatistics) SetFailure ¶
func (stats *TotalStatistics) SetFailure(failed int64)
func (*TotalStatistics) SetLongest ¶
func (stats *TotalStatistics) SetLongest(longest int64)
func (*TotalStatistics) SetResponseTime ¶
func (stats *TotalStatistics) SetResponseTime(responseTime int64)
func (*TotalStatistics) SetShortest ¶
func (stats *TotalStatistics) SetShortest(shortest int64)
func (*TotalStatistics) SetSuccessful ¶
func (stats *TotalStatistics) SetSuccessful(successful int64)
func (*TotalStatistics) SetTotal ¶
func (stats *TotalStatistics) SetTotal(total int64)
func (*TotalStatistics) Shortest ¶
func (stats *TotalStatistics) Shortest() int64
func (*TotalStatistics) Successful ¶
func (stats *TotalStatistics) Successful() int64
func (*TotalStatistics) Total ¶
func (stats *TotalStatistics) Total() int64
Click to show internal directories.
Click to hide internal directories.