pub struct FidelityCalculator { /* private fields */ }Expand description
Fidelity calculator
Implementations§
Source§impl FidelityCalculator
impl FidelityCalculator
Sourcepub fn calculate(
&self,
mock_schema: &Value,
real_schema: &Value,
mock_samples: &[Value],
real_samples: &[Value],
mock_response_times: Option<&[u64]>,
real_response_times: Option<&[u64]>,
mock_error_patterns: Option<&HashMap<String, usize>>,
real_error_patterns: Option<&HashMap<String, usize>>,
) -> FidelityScore
pub fn calculate( &self, mock_schema: &Value, real_schema: &Value, mock_samples: &[Value], real_samples: &[Value], mock_response_times: Option<&[u64]>, real_response_times: Option<&[u64]>, mock_error_patterns: Option<&HashMap<String, usize>>, real_error_patterns: Option<&HashMap<String, usize>>, ) -> FidelityScore
Calculate fidelity score for a workspace
§Arguments
mock_schema- Mock/expected schemareal_schema- Real/actual schemamock_samples- Mock sample responsesreal_samples- Real sample responsesmock_response_times- Mock response times (optional)real_response_times- Real response times (optional)mock_error_patterns- Mock error patterns (optional)real_error_patterns- Real error patterns (optional)
§Returns
Fidelity score
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FidelityCalculator
impl RefUnwindSafe for FidelityCalculator
impl Send for FidelityCalculator
impl Sync for FidelityCalculator
impl Unpin for FidelityCalculator
impl UnwindSafe for FidelityCalculator
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