Struct usl::Measurement[][src]

pub struct Measurement {
    pub n: f64,
    pub x: f64,
    pub r: f64,
}
Expand description

A simultaneous measurement of at least two of the parameters of Little’s Law: concurrency, throughput, and latency. The third parameter is inferred from the other two.

Measurement instances can be created from pairs of dimensional types: u32 for the number of concurrent events, f64 for the average rate of events, and Duration for the average duration of events:

use usl::Measurement;
use std::time::Duration;

let m: Measurement = (30, 1000.0).into();
let m: Measurement = (1000.0, 30).into();
let m: Measurement = (30, Duration::from_millis(200)).into();
let m: Measurement = (Duration::from_millis(200), 30).into();
let m: Measurement = (1000.0, Duration::from_millis(200)).into();
let m: Measurement = (Duration::from_millis(200), 1000.0).into();

Fields

n: f64

The average number of concurrent events.

x: f64

The long-term arrival rate of events, in events/sec.

r: f64

The average duration of events, in seconds.

Implementations

Create a measurement of a system’s latency at a given level of concurrency. The throughput of the system is derived via Little’s Law.

Create a measurement of a system’s throughput at a given level of concurrency. The latency of the system is derived via Little’s Law.

Create a measurement of a system’s latency at a given level of throughput. The concurrency of the system is derived via Little’s Law.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Creates a value from an iterator. 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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

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

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

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.