Documentation ¶
Index ¶
- type Client
- func (c *Client) Amount() int
- func (*Client) BytesRead() uint64
- func (*Client) BytesWritten() uint64
- func (*Client) ConnOpen() uint64
- func (c *Client) ErrorMessages() map[string]int
- func (*Client) Errors() uint64
- func (c *Client) Flush()
- func (c *Client) Overflow() int
- func (*Client) RequestDuration() map[float64]float64
- func (*Client) RequestSuccess() uint64
- func (*Client) RequestSum() uint64
- func (c *Client) RunWorkers(n int)
- func (c *Client) StatusCodes() map[string]float64
- func (*Client) Timeouts() uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Jobsch is a channel of tasks(requests) which should be done Jobsch chan struct{} *fasthttp.HostClient sync.Mutex // contains filtered or unexported fields }
Client is a wrapper for fasthttp.HostClient It allows to send requests and collect metrics while sending
func (*Client) Amount ¶
Amount return number of created workers after Flush() workers would flushed too
func (*Client) BytesWritten ¶
BytesWritten returns value of bytesWritten-metric
func (*Client) ErrorMessages ¶
ErrorMessages returns map errorMessage:value for errorMessages-metric where value is a number of errors with same message
func (*Client) Flush ¶
func (c *Client) Flush()
Flush dropping out and re-init all counters and metrics
func (*Client) Overflow ¶
Overflow return length of job-channel after calling Flush(), channel would flushed too
func (*Client) RequestDuration ¶
RequestDuration returns map quantile:value for requestDuration-metric
func (*Client) RequestSuccess ¶
RequestSuccess returns value of requestSuccess-metric
func (*Client) RequestSum ¶
RequestSum returns value of requestSum-metric
func (*Client) RunWorkers ¶
RunWorkers runs n goroutines to serve jobs from Jobsch
func (*Client) StatusCodes ¶
StatusCodes returns map statusCode:value for statusCodes-metric where value is an percent of total number of requests