pub struct PooledExecutor { /* private fields */ }Expand description
Executor using a warm worker pool for maximum throughput.
Pre-spawns Python worker processes that stay alive between test runs, eliminating subprocess spawn overhead (200-300ms per batch).
Implementations§
Source§impl PooledExecutor
impl PooledExecutor
Sourcepub async fn new(
python_path: PathBuf,
worker_count: usize,
working_dir: PathBuf,
) -> Result<Self>
pub async fn new( python_path: PathBuf, worker_count: usize, working_dir: PathBuf, ) -> Result<Self>
Create a new pooled executor.
Sourcepub fn update_duration(&mut self, node_id: &str, duration_ms: u64)
pub fn update_duration(&mut self, node_id: &str, duration_ms: u64)
Update duration history for a test.
Sourcepub fn scheduler_mut(&mut self) -> &mut TestScheduler
pub fn scheduler_mut(&mut self) -> &mut TestScheduler
Get the scheduler for external updates.
Trait Implementations§
Source§impl Debug for PooledExecutor
impl Debug for PooledExecutor
Source§impl TestExecutor for PooledExecutor
impl TestExecutor for PooledExecutor
Source§fn run_test<'life0, 'life1, 'async_trait>(
&'life0 self,
node_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<TestResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn run_test<'life0, 'life1, 'async_trait>(
&'life0 self,
node_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<TestResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run a single test and return the result.
Source§fn run_tests<'life0, 'life1, 'async_trait>(
&'life0 self,
node_ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Vec<TestResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn run_tests<'life0, 'life1, 'async_trait>(
&'life0 self,
node_ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Vec<TestResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run multiple tests and return all results.
Source§fn configure(&mut self, config: ExecutorConfig)
fn configure(&mut self, config: ExecutorConfig)
Configure the executor with the given settings.
Source§fn execution_mode(&self) -> &'static str
fn execution_mode(&self) -> &'static str
Get the execution mode name for logging.
Auto Trait Implementations§
impl !RefUnwindSafe for PooledExecutor
impl !UnwindSafe for PooledExecutor
impl Freeze for PooledExecutor
impl Send for PooledExecutor
impl Sync for PooledExecutor
impl Unpin for PooledExecutor
impl UnsafeUnpin for PooledExecutor
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