pub struct ChaosConfig {
pub scenario: ChaosScenario,
pub duration_frames: u64,
pub seed: u64,
pub intensity: f32,
}Expand description
Configuration for chaos testing scenarios.
§Example
use jugar_web::loadtest::ChaosConfig;
let config = ChaosConfig::input_flood();
assert_eq!(config.duration_frames, 300);Fields§
§scenario: ChaosScenarioScenario type to execute.
duration_frames: u64Duration in frames.
seed: u64Random seed for reproducibility.
intensity: f32Intensity level (0.0 - 1.0).
Implementations§
Source§impl ChaosConfig
impl ChaosConfig
Sourcepub const fn new(
scenario: ChaosScenario,
duration_frames: u64,
seed: u64,
) -> Self
pub const fn new( scenario: ChaosScenario, duration_frames: u64, seed: u64, ) -> Self
Create a new chaos configuration.
Sourcepub const fn entity_storm() -> Self
pub const fn entity_storm() -> Self
Standard entity storm for stress testing.
Spawns up to 1000 entities over 600 frames (10 seconds at 60 FPS).
Sourcepub const fn input_flood() -> Self
pub const fn input_flood() -> Self
Input flood to test buffer limits.
Generates 100 input events per frame for 300 frames.
Sourcepub const fn time_warp() -> Self
pub const fn time_warp() -> Self
Time warp scenario for physics stability testing.
Varies delta time from 0.1ms to 1000ms.
Sourcepub const fn resize_blitz() -> Self
pub const fn resize_blitz() -> Self
Resize blitz for layout testing.
Triggers resize every 5 frames for 300 frames.
Sourcepub const fn rng_torture() -> Self
pub const fn rng_torture() -> Self
RNG torture test for determinism validation.
Tests 1000 different RNG seeds.
Sourcepub const fn config_sweep() -> Self
pub const fn config_sweep() -> Self
Configuration sweep for edge case testing.
Sourcepub const fn with_intensity(self, intensity: f32) -> Self
pub const fn with_intensity(self, intensity: f32) -> Self
Set the intensity level (0.0 - 1.0).
Trait Implementations§
Source§impl Clone for ChaosConfig
impl Clone for ChaosConfig
Source§fn clone(&self) -> ChaosConfig
fn clone(&self) -> ChaosConfig
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 moreAuto Trait Implementations§
impl Freeze for ChaosConfig
impl RefUnwindSafe for ChaosConfig
impl Send for ChaosConfig
impl Sync for ChaosConfig
impl Unpin for ChaosConfig
impl UnwindSafe for ChaosConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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