pub struct TestExecutionEngine {
pub execution_queue: VecDeque<TestExecutionRequest>,
pub active_executions: HashMap<String, ActiveTestExecution>,
pub execution_history: VecDeque<TestExecutionResult>,
pub resource_monitor: ResourceMonitor,
}Expand description
Test execution engine
Fields§
§execution_queue: VecDeque<TestExecutionRequest>Execution queue
active_executions: HashMap<String, ActiveTestExecution>Active executions
execution_history: VecDeque<TestExecutionResult>Execution history
resource_monitor: ResourceMonitorResource monitor
Implementations§
Source§impl TestExecutionEngine
impl TestExecutionEngine
pub fn new() -> Self
Sourcepub fn queue_test(
&mut self,
request: TestExecutionRequest,
) -> Result<String, String>
pub fn queue_test( &mut self, request: TestExecutionRequest, ) -> Result<String, String>
Queue a test execution request
Sourcepub fn execute_test(
&mut self,
request: TestExecutionRequest,
) -> Result<TestExecutionResult, String>
pub fn execute_test( &mut self, request: TestExecutionRequest, ) -> Result<TestExecutionResult, String>
Execute a test request
Sourcepub fn get_execution_status(
&self,
execution_id: &str,
) -> Option<&ActiveTestExecution>
pub fn get_execution_status( &self, execution_id: &str, ) -> Option<&ActiveTestExecution>
Get execution status
Sourcepub fn cancel_execution(&mut self, execution_id: &str) -> Result<(), String>
pub fn cancel_execution(&mut self, execution_id: &str) -> Result<(), String>
Cancel a running execution
Sourcepub const fn get_execution_history(&self) -> &VecDeque<TestExecutionResult>
pub const fn get_execution_history(&self) -> &VecDeque<TestExecutionResult>
Get execution history
Sourcepub fn queue_size(&self) -> usize
pub fn queue_size(&self) -> usize
Get current queue size
Sourcepub fn active_execution_count(&self) -> usize
pub fn active_execution_count(&self) -> usize
Get active execution count
Sourcepub fn process_next(&mut self) -> Result<Option<TestExecutionResult>, String>
pub fn process_next(&mut self) -> Result<Option<TestExecutionResult>, String>
Process next test in queue
Sourcepub fn clear_history(&mut self)
pub fn clear_history(&mut self)
Clear execution history
Sourcepub fn update_resource_usage(&mut self, usage: ResourceUsage)
pub fn update_resource_usage(&mut self, usage: ResourceUsage)
Update resource usage
Sourcepub const fn has_available_resources(
&self,
allocation: &ResourceAllocation,
) -> bool
pub const fn has_available_resources( &self, allocation: &ResourceAllocation, ) -> bool
Check if resources are available for new test
Auto Trait Implementations§
impl Freeze for TestExecutionEngine
impl !RefUnwindSafe for TestExecutionEngine
impl Send for TestExecutionEngine
impl Sync for TestExecutionEngine
impl Unpin for TestExecutionEngine
impl !UnwindSafe for TestExecutionEngine
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.