pub struct TuiLoadTest { /* private fields */ }Expand description
TUI Load Test Runner
Framework-agnostic load testing for TUI applications.
Implementations§
Source§impl TuiLoadTest
impl TuiLoadTest
Sourcepub fn with_item_count(self, count: usize) -> Self
pub fn with_item_count(self, count: usize) -> Self
Create with specific item count
Sourcepub fn with_frame_budget_ms(self, budget_ms: f64) -> Self
pub fn with_frame_budget_ms(self, budget_ms: f64) -> Self
Set frame budget in milliseconds
Sourcepub fn with_timeout_ms(self, timeout_ms: u64) -> Self
pub fn with_timeout_ms(self, timeout_ms: u64) -> Self
Set timeout for hang detection
Sourcepub fn with_filters(self, filters: Vec<String>) -> Self
pub fn with_filters(self, filters: Vec<String>) -> Self
Set filters to test
Sourcepub fn with_frames_per_filter(self, count: usize) -> Self
pub fn with_frames_per_filter(self, count: usize) -> Self
Set number of frames per filter
Sourcepub fn with_strict_budget(self, strict: bool) -> Self
pub fn with_strict_budget(self, strict: bool) -> Self
Enable strict budget enforcement
Sourcepub fn data(&self) -> &[SyntheticItem]
pub fn data(&self) -> &[SyntheticItem]
Get the generated test data
Sourcepub fn config(&self) -> &TuiLoadConfig
pub fn config(&self) -> &TuiLoadConfig
Get configuration
Sourcepub fn run<F>(&self, render: F) -> TuiLoadResult<TuiFrameMetrics>
pub fn run<F>(&self, render: F) -> TuiLoadResult<TuiFrameMetrics>
Run load test with a render callback
The callback receives:
items: Slice of synthetic items to renderfilter: Current filter string
The callback should perform the actual TUI rendering and return the frame time in microseconds, or None if it wants the test harness to measure time.
§Errors
Returns error if a frame times out (hang detected) or exceeds budget in strict mode.
Sourcepub fn run_filter_stress<F>(
&self,
filter_fn: F,
) -> TuiLoadResult<Vec<(String, TuiFrameMetrics)>>
pub fn run_filter_stress<F>( &self, filter_fn: F, ) -> TuiLoadResult<Vec<(String, TuiFrameMetrics)>>
Run filter-specific performance test
Tests filtering with increasing filter lengths to detect O(n²) or worse complexity in filter implementations.
§Errors
Returns error if hang detected or budget exceeded.
Trait Implementations§
Source§impl Debug for TuiLoadTest
impl Debug for TuiLoadTest
Auto Trait Implementations§
impl Freeze for TuiLoadTest
impl RefUnwindSafe for TuiLoadTest
impl Send for TuiLoadTest
impl Sync for TuiLoadTest
impl Unpin for TuiLoadTest
impl UnsafeUnpin for TuiLoadTest
impl UnwindSafe for TuiLoadTest
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().