[][src]Struct thesis::experiment::Experiment

pub struct Experiment<T, C, E, R, M> { /* fields omitted */ }

An individual experiment. See crate-level documentation for an example on how to use

Implementations

impl<T> Experiment<T, (), (), (), Box<dyn FnOnce(Mismatch<T>) -> T>> where
    T: PartialEq
[src]

pub fn new(name: &'static str) -> Self[src]

Create a new experiment. The only provided default is accepting the control value in the mismatch handler. All other builder-style functions must be called before run can be called.

impl<T, C, E, R, M> Experiment<T, C, E, R, M>[src]

pub fn control<NC>(
    self,
    control_builder: NC
) -> Experiment<T, Instrumented<NC>, E, R, M> where
    NC: Future<Output = T>, 
[src]

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, Instrumented<NE>, R, M> where
    NE: Future<Output = T>, 
[src]

Use the future given here as the experimental, or the new method for calculating a value

pub fn rollout_strategy<NR>(
    self,
    rollout_strategy: NR
) -> Experiment<T, C, E, NR, M>
[src]

Use the given strategy for rolling out the new code

pub fn on_mismatch<NM>(self, on_mismatch: NM) -> Experiment<T, C, E, R, NM> where
    NM: FnOnce(Mismatch<T>) -> T, 
[src]

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: FnOnce(Mismatch<T>) -> T,
    C: Future<Output = T>,
    E: Future<Output = T>, 
[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]