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.