pub struct ReqwestGenerator<S: Scenario> {
    pub scenario: S,
    pub max_open_connections: usize,
    pub warmup: bool,
    pub req: Request,
    /* private fields */
}
Expand description

Very simple reqwest based generator. This generator does not use HTTP multiplexing and is very sensitive to latency. For good proformance, it is recommended to test servers running on the same LAN as your machine. This Generator will reuse TCP connections for requests, and all request will be sent from the same IP.

Graph of RequestGenerator

Fields

scenario: Smax_open_connections: usize

This is the maximum amount of TCP file descriptors being used at any one time. The actual number of open connections will be higher, because it takes time to purge old fd’s.

warmup: bool

Let this generator warm up to the rate at t=0 before sending test data.

req: Request

The request to send.

Implementations

Constructs a new ReqwestGenerator

Trait Implementations

Runs the current scenario

Run the generator at full throttle!

Sets a Scenario for the generator to try and replicate.

Gets the current Scenario

Send a single packet per call, used for debuging and low traffic testing.

Give a bounded channel that sends time series data on the send rate of a generator. The data is encoded as (Miliseconds since start of scenario, counts/sec). Read more

Give a bounded channel that sends the total amount of packets/requests sent

Give a bounded channel that sends time series data on the send rate of a generator. The data is encoded as (Miliseconds since start of scenario, counts/sec). Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more