Struct goose::goose::GooseRequest[][src]

pub struct GooseRequest {
    pub path: String,
    pub method: GooseMethod,
    pub response_times: BTreeMap<usize, usize>,
    pub min_response_time: usize,
    pub max_response_time: usize,
    pub total_response_time: usize,
    pub response_time_counter: usize,
    pub status_code_counts: HashMap<u16, usize>,
    pub success_count: usize,
    pub fail_count: usize,
    pub load_test_hash: u64,
}
Expand description

Metrics collected about a path-method pair, (for example /index-GET).

Fields

path: String
Expand description

The path for which metrics are being collected.

method: GooseMethod
Expand description

The method for which metrics are being collected.

response_times: BTreeMap<usize, usize>
Expand description

Per-response-time counters, tracking how often pages are returned with this response time.

min_response_time: usize
Expand description

The shortest response time seen so far.

max_response_time: usize
Expand description

The longest response time seen so far.

total_response_time: usize
Expand description

Total combined response times seen so far.

response_time_counter: usize
Expand description

Total number of response times seen so far.

status_code_counts: HashMap<u16, usize>
Expand description

Per-status-code counters, tracking how often each response code was returned for this request.

success_count: usize
Expand description

Total number of times this path-method request resulted in a successful (2xx) status code.

fail_count: usize
Expand description

Total number of times this path-method request resulted in a non-successful (non-2xx) status code.

load_test_hash: u64
Expand description

Load test hash.

Implementations

impl GooseRequest[src]

pub fn new(path: &str, method: GooseMethod, load_test_hash: u64) -> Self[src]

Create a new GooseRequest object.

pub fn set_response_time(&mut self, response_time: u64)[src]

Track response time.

pub fn set_status_code(&mut self, status_code: u16)[src]

Increment counter for status code, creating new counter if first time seeing status code.

Trait Implementations

impl Clone for GooseRequest[src]

fn clone(&self) -> GooseRequest[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for GooseRequest[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'de> Deserialize<'de> for GooseRequest[src]

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Ord for GooseRequest[src]

Implement ordering for GooseRequest.

fn cmp(&self, other: &Self) -> Ordering[src]

This method returns an Ordering between self and other. Read more

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

impl PartialEq<GooseRequest> for GooseRequest[src]

fn eq(&self, other: &GooseRequest) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &GooseRequest) -> bool[src]

This method tests for !=.

impl PartialOrd<GooseRequest> for GooseRequest[src]

Implement partial-ordering for GooseRequest.

fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Serialize for GooseRequest[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl Eq for GooseRequest[src]

impl StructuralEq for GooseRequest[src]

impl StructuralPartialEq for GooseRequest[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

pub fn equivalent(&self, key: &K) -> bool[src]

Compare self to key and return true if they are equal.

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

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

fn in_current_span(self) -> Instrumented<Self>[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]