Struct thesis::experiment::Experiment [−][src]
pub struct Experiment<T, C, E, R, M> { /* fields omitted */ }
Expand description
An individual experiment. See crate-level documentation for an example on how to use
Implementations
pub fn control<NC>(self, control_builder: NC) -> Experiment<T, NC, E, R, M> where
NC: Future<Output = T>,
pub fn control<NC>(self, control_builder: NC) -> Experiment<T, NC, E, R, M> where
NC: Future<Output = T>,
Use the future given here as the control, or the existing method for calculating a value
pub fn experimental<NE>(
self,
experimental_builder: NE
) -> Experiment<T, C, NE, R, M> where
NE: Future<Output = T>,
pub fn experimental<NE>(
self,
experimental_builder: NE
) -> Experiment<T, C, NE, R, M> where
NE: Future<Output = T>,
Use the future given here as the experimental, or the new method for calculating a value
Use the given strategy for rolling out the new code
pub fn on_mismatch<NM>(
self,
on_mismatch: NM
) -> Experiment<T, C, E, R, FnTrait<NM>> where
NM: FnOnce(Mismatch<T>) -> T,
pub fn on_mismatch<NM>(
self,
on_mismatch: NM
) -> Experiment<T, C, E, R, FnTrait<NM>> where
NM: FnOnce(Mismatch<T>) -> T,
Call this function when running the experiment results in a different
value from the control and experimental methods. This can only happen
when the rollout strategy returns
RolloutDecision::UseExperimentalAndCompare
.
pub async fn run(self) -> T where
T: PartialEq,
R: RolloutStrategy,
M: MismatchHandler<T>,
C: Future<Output = T>,
E: Future<Output = T>,
pub async fn run(self) -> T where
T: PartialEq,
R: RolloutStrategy,
M: MismatchHandler<T>,
C: Future<Output = T>,
E: Future<Output = T>,
Run the experiment with the parameters provided
pub async fn run_result(self) -> Result<T, Err> where
T: PartialEq,
R: RolloutStrategy,
M: MismatchHandler<Result<T, Err>>,
C: Future<Output = Result<T, Err>>,
E: Future<Output = Result<T, Err>>,
Err: Display,
pub async fn run_result(self) -> Result<T, Err> where
T: PartialEq,
R: RolloutStrategy,
M: MismatchHandler<Result<T, Err>>,
C: Future<Output = Result<T, Err>>,
E: Future<Output = Result<T, Err>>,
Err: Display,
Run the experiment with the parameters provided
Auto Trait Implementations
impl<T, C, E, R, M> RefUnwindSafe for Experiment<T, C, E, R, M> where
C: RefUnwindSafe,
E: RefUnwindSafe,
M: RefUnwindSafe,
R: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, C, E, R, M> Send for Experiment<T, C, E, R, M> where
C: Send,
E: Send,
M: Send,
R: Send,
T: Send,
impl<T, C, E, R, M> Sync for Experiment<T, C, E, R, M> where
C: Sync,
E: Sync,
M: Sync,
R: Sync,
T: Sync,
impl<T, C, E, R, M> Unpin for Experiment<T, C, E, R, M> where
C: Unpin,
E: Unpin,
M: Unpin,
R: Unpin,
T: Unpin,
impl<T, C, E, R, M> UnwindSafe for Experiment<T, C, E, R, M> where
C: UnwindSafe,
E: UnwindSafe,
M: UnwindSafe,
R: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more