pub struct BenchmarkSystemUseCase;Expand description
Use case for benchmarking pipeline performance.
This use case performs comprehensive performance testing across multiple configurations to identify optimal settings for different file sizes.
Implementations§
Source§impl BenchmarkSystemUseCase
impl BenchmarkSystemUseCase
Sourcepub async fn execute(
&self,
file: Option<PathBuf>,
size_mb: usize,
iterations: usize,
) -> Result<()>
pub async fn execute( &self, file: Option<PathBuf>, size_mb: usize, iterations: usize, ) -> Result<()>
Executes the benchmark system use case.
Runs comprehensive benchmarks to test pipeline performance across various configurations, comparing adaptive settings against alternatives.
§Parameters
file- Optional existing file to use (otherwise generates test files)size_mb- Specific file size to test (0 = test all default sizes)iterations- Number of iterations per configuration (default: 3)
§Test Configurations
For each file size, tests:
- Adaptive Configuration: Recommended chunk/worker settings
- Chunk Variations: Different chunk sizes with adaptive workers
- Worker Variations: Different worker counts with adaptive chunk size
§Output
Generates pipeline_optimization_report.md containing:
- Performance comparison tables
- Adaptive vs best configuration analysis
- Detailed results for all tested configurations
- Summary recommendations for each file size
§Returns
Ok(())- Benchmark completed successfullyErr(anyhow::Error)- Benchmark failed
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BenchmarkSystemUseCase
impl RefUnwindSafe for BenchmarkSystemUseCase
impl Send for BenchmarkSystemUseCase
impl Sync for BenchmarkSystemUseCase
impl Unpin for BenchmarkSystemUseCase
impl UnwindSafe for BenchmarkSystemUseCase
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> 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>
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