Documentation
¶
Overview ¶
Package internal provides the implementation support for heyyall
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IRequestor ¶
type IRequestor interface { ProcessRqst(ep api.Endpoint, numRqsts int, rqstRate int) ResponseChan() chan Response }
IRequestor declares the functionality needed to make requests to an endpoint
type OutputType ¶
type OutputType int
OutputType specifies the output formate of the final report. There are 2 values, 'text' and 'json'. 'text' will present a human readable form. 'json' will present the JSON structures that capture the detailed run stats.
const ( // Text specifies only high level report stats will be produced Text OutputType = iota // JSON indicates detailed reporting stats will be produced JSON )
type Requestor ¶
type Requestor struct { // Context is used to cancel the goroutine Ctx context.Context // ResponseC is used to send the results of a request to the response handler ResponseC chan Response // Client is the target of the test run Client http.Client }
Requestor is the component that will schedule requests to endpoints. It expects to be run as a goroutine.
func (Requestor) ProcessRqst ¶
ProcessRqst runs the requests configured by 'ep' at the requested rate for either 'numRqsts' times or the configured run duration (set in Requestor.Ctx)
func (Requestor) ResponseChan ¶
ResponseChan returns a chan Response
type Response ¶
type Response struct { HTTPStatus int Endpoint api.Endpoint Header http.Header RequestDuration time.Duration DNSLookupDuration time.Duration TCPConnDuration time.Duration RoundTripDuration time.Duration TLSHandshakeDuration time.Duration }
Response contains information describing the results of a request to a specific endpoint
type ResponseHandler ¶
type ResponseHandler struct { OutputType OutputType ResponseC chan Response ProgressC chan interface{} DoneC chan interface{} NumRqsts int NormFactor int // contains filtered or unexported fields }
ResponseHandler is responsible for accepting, summarizing, and reporting on the overall load test results.
func (*ResponseHandler) Start ¶
func (rh *ResponseHandler) Start()
Start begins the process of accepting responses. It expects to be run as a goroutine.
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler determines which requests to make over the schedC channel based on each Endpoint's 'RqstPercent'