Safe Haskell | None |
---|---|
Language | Haskell2010 |
Control.Tracer.Transformers.ObserveOutcome
Contents
Description
Observing events with annotations of thread id and time.
Synopsis
- class Monad m => Outcome m a where
- type IntermediateValue a
- type OutcomeMetric a
- classifyObservable :: a -> m OutcomeProgressionStatus
- captureObservableValue :: a -> m (IntermediateValue a)
- computeOutcomeMetric :: a -> IntermediateValue a -> IntermediateValue a -> m (OutcomeMetric a)
- type OutcomeEnhancedTracer m a = Tracer m (Either a (OutcomeFidelity (OutcomeMetric a)))
- data OutcomeFidelity a
- data OutcomeProgressionStatus
- mkOutcomeExtractor :: forall m a. (MonadIO m, MonadMask m, Outcome m a) => m (OutcomeEnhancedTracer m a -> Tracer m a)
transformer
class Monad m => Outcome m a where Source #
Methods
classifyObservable :: a -> m OutcomeProgressionStatus Source #
captureObservableValue :: a -> m (IntermediateValue a) Source #
computeOutcomeMetric :: a -> IntermediateValue a -> IntermediateValue a -> m (OutcomeMetric a) Source #
type OutcomeEnhancedTracer m a = Tracer m (Either a (OutcomeFidelity (OutcomeMetric a))) Source #
The Maybe (OutcomeMetric a) captures the 'DeltaQ-ness' of the nature of outcomes, may / may not complete.
data OutcomeFidelity a Source #
Also need to know that observables happened in the "right way"
Constructors
EndsBeforeStarted | |
StartsBeforeEnds a | |
ProgressedNormally a |
Instances
Show a => Show (OutcomeFidelity a) Source # | |
Defined in Control.Tracer.Transformers.ObserveOutcome Methods showsPrec :: Int -> OutcomeFidelity a -> ShowS # show :: OutcomeFidelity a -> String # showList :: [OutcomeFidelity a] -> ShowS # |
data OutcomeProgressionStatus Source #
Constructors
OutcomeStarts | |
OutcomeOther | |
OutcomeEnds |
Instances
Eq OutcomeProgressionStatus Source # | |
Defined in Control.Tracer.Transformers.ObserveOutcome Methods (==) :: OutcomeProgressionStatus -> OutcomeProgressionStatus -> Bool # (/=) :: OutcomeProgressionStatus -> OutcomeProgressionStatus -> Bool # |
mkOutcomeExtractor :: forall m a. (MonadIO m, MonadMask m, Outcome m a) => m (OutcomeEnhancedTracer m a -> Tracer m a) Source #
Generic Trace transformer. It could be written to take an initial argument, but restricting the scope of that per-invocation state seems more appropriate (for the moment). That may be of use if/when explict management of timeout was required and/or non-termination of the outcome at the end of a run was of interest.