pub struct ProbeResult {
pub avg_latency: Duration,
pub samples: u32,
}Expand description
Result of a pre-flight latency probe.
Fields§
§avg_latency: DurationObserved average request latency.
samples: u32Number of successful probe requests.
Implementations§
Source§impl ProbeResult
impl ProbeResult
Sourcepub fn required_vus(&self, target_rps: u32, num_operations: u32) -> u32
pub fn required_vus(&self, target_rps: u32, num_operations: u32) -> u32
Required VUs to sustain target_rps end-to-end with num_operations
per iteration.
Why num_operations matters: k6’s constant-arrival-rate executor
(set by --rps) targets ITERATIONS per second, not requests. Each
iteration runs every operation in the generated script sequentially.
So sustaining --rps R with a spec of N operations actually needs
R × N × latency_secs VUs, not R × latency_secs.
Issue #79 round 9 — Srikanth saw “Pre-flight probe: –vus 5 is sufficient” followed by k6 emitting “Insufficient VUs” mid-run. Cause: he had a ~12-operation spec, so the real iteration time was ~12 × measured latency, not 1 ×.
Formula: rps × num_operations × latency_secs + 1 (safety margin).
Returns at least 1.
Trait Implementations§
Source§impl Clone for ProbeResult
impl Clone for ProbeResult
Source§fn clone(&self) -> ProbeResult
fn clone(&self) -> ProbeResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProbeResult
impl Debug for ProbeResult
impl Copy for ProbeResult
Auto Trait Implementations§
impl Freeze for ProbeResult
impl RefUnwindSafe for ProbeResult
impl Send for ProbeResult
impl Sync for ProbeResult
impl Unpin for ProbeResult
impl UnsafeUnpin for ProbeResult
impl UnwindSafe for ProbeResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more