pub struct PacingProfile {
pub rate_limit_rps: f64,
pub jitter_pct: f64,
pub min_request_interval_ms: u64,
}Expand description
Pacing knobs (rate, jitter, minimum inter-request interval).
§Example
use stygian_charon::playbooks::PacingProfile;
use stygian_charon::types::TargetClass;
let pacing = PacingProfile::default_for(TargetClass::HighSecurity);
assert!(pacing.rate_limit_rps <= 1.0);
assert!(pacing.min_request_interval_ms >= 1_000);Fields§
§rate_limit_rps: f64Sustained requests per second. Must be > 0.
jitter_pct: f64Jitter as a fraction of the inter-request interval (0.0–1.0).
min_request_interval_ms: u64Minimum inter-request interval in milliseconds.
Implementations§
Source§impl PacingProfile
impl PacingProfile
Sourcepub const fn default_for(target_class: TargetClass) -> Self
pub const fn default_for(target_class: TargetClass) -> Self
Build a pacing profile appropriate for a target class.
Trait Implementations§
Source§impl Clone for PacingProfile
impl Clone for PacingProfile
Source§fn clone(&self) -> PacingProfile
fn clone(&self) -> PacingProfile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PacingProfile
impl Debug for PacingProfile
Source§impl Default for PacingProfile
impl Default for PacingProfile
Source§impl<'de> Deserialize<'de> for PacingProfile
impl<'de> Deserialize<'de> for PacingProfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PacingProfile
impl PartialEq for PacingProfile
Source§impl Serialize for PacingProfile
impl Serialize for PacingProfile
impl StructuralPartialEq for PacingProfile
Auto Trait Implementations§
impl Freeze for PacingProfile
impl RefUnwindSafe for PacingProfile
impl Send for PacingProfile
impl Sync for PacingProfile
impl Unpin for PacingProfile
impl UnsafeUnpin for PacingProfile
impl UnwindSafe for PacingProfile
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
Mutably borrows from an owned value. Read more