pub struct ShadowRunner { /* private fields */ }Expand description
Shadow runner that may optionally execute a configured RTK adapter.
Implementations§
Source§impl ShadowRunner
impl ShadowRunner
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Create a runner with no production-side effects and no external arm.
Sourcepub fn with_adapter(adapter: RtkShellAdapter) -> Self
pub fn with_adapter(adapter: RtkShellAdapter) -> Self
Create a runner with a reference adapter used only for observations.
Share one kill-switched adapter between benchmark workers.
Sourcepub fn compare(
&self,
task_id: impl Into<String>,
native_observation: CapabilityObservationV1,
external_observation: Option<CapabilityObservationV1>,
) -> ShadowComparisonReport
pub fn compare( &self, task_id: impl Into<String>, native_observation: CapabilityObservationV1, external_observation: Option<CapabilityObservationV1>, ) -> ShadowComparisonReport
Compare observations that were already collected by another runner.
Sourcepub fn run(
&self,
invocation: CapabilityInvocation,
) -> OclaResult<ShadowComparisonReport>
pub fn run( &self, invocation: CapabilityInvocation, ) -> OclaResult<ShadowComparisonReport>
Run native and RTK sequentially against the same invocation.
Sourcepub fn compare_preserving<T>(
&self,
production_response: &T,
invocation: CapabilityInvocation,
) -> OclaResult<ShadowComparisonReport>
pub fn compare_preserving<T>( &self, production_response: &T, invocation: CapabilityInvocation, ) -> OclaResult<ShadowComparisonReport>
Prove the shadow boundary by borrowing, never mutating, production data.
The response is deliberately generic and immutable: a shadow report is produced beside it and can never replace it through this API.
Trait Implementations§
Source§impl Clone for ShadowRunner
impl Clone for ShadowRunner
Source§fn clone(&self) -> ShadowRunner
fn clone(&self) -> ShadowRunner
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShadowRunner
impl Debug for ShadowRunner
Source§impl Default for ShadowRunner
impl Default for ShadowRunner
Source§fn default() -> ShadowRunner
fn default() -> ShadowRunner
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ShadowRunner
impl RefUnwindSafe for ShadowRunner
impl Send for ShadowRunner
impl Sync for ShadowRunner
impl Unpin for ShadowRunner
impl UnsafeUnpin for ShadowRunner
impl UnwindSafe for ShadowRunner
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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