Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Otchkiss ¶
func FromConfig ¶
func FromConfig(requester Requester, setting *setting.Setting, resultCapacity int) (*Otchkiss, error)
FromConfig returns Otchkiss instance by user specified setting. Too large values for resultCapacity may cause OOM (FYI: default value is 100M).
func New ¶
New returns Otchkiss instance with default setting. By default, the following three command line arguments are parsed and set.
-p: Specify the number of parallels executions. 0 means unlimited (default: 1, it's not concurrently) -d: Running duration, ex: 300s or 5m etc... (default: 5s) -w: Exclude from results for a given time after startup, ex: 300s or 5m etc... (default: 5s) -r: Specify the max request per second. 0 means unlimited (default: 1)
Note: -p or -r, whichever is smaller blocks the request.
type ReportParams ¶
type Requester ¶
type Requester interface { // Init is executed only once before the repeated RequestOne loop. // If initialization is unnecessary, do nothing and return nil. Init() error // RequestOne is executed repeatedly and in parallel. // Normally HTTP, gRPC, and other requests are written here. // If an error is returned the request is counted as a failure; otherwise, it is counted as a success. RequestOne(ctx context.Context) error // Terminate is executed only once after the repeated RequestOne loop. // If termination is unnecessary, do nothing and return nil. Terminate() error }
Requester defines the behavior of the request that Otchkiss performs.
Click to show internal directories.
Click to hide internal directories.