Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
This module provides a set of statistics over the execution of the registry. This allows to get better insights over the execution or test that the registry is well configured
Synopsis
- data Statistics = Statistics {
- operations :: Operations
- values :: Values
- type Operations = [AppliedFunction]
- type Paths = [[Value]]
- data AppliedFunction = AppliedFunction {
- _outputValue :: Value
- _inputValues :: [Value]
- initStatistics :: Values -> Statistics
- valuesSpecializations :: Statistics -> [Specialization]
- allValuesPaths :: Statistics -> Paths
- valuePaths :: Value -> Paths
- findMostRecentValue :: forall a. Typeable a => Statistics -> Maybe Value
- findCreatedValues :: forall a. Typeable a => Statistics -> [Value]
DATA TYPES
data Statistics Source #
This datatype records: - the created values - the applied functions - the specializations used to create values
Instances
Monoid Statistics Source # | |
Defined in Data.Registry.Internal.Statistics mempty :: Statistics # mappend :: Statistics -> Statistics -> Statistics # mconcat :: [Statistics] -> Statistics # | |
Semigroup Statistics Source # | |
Defined in Data.Registry.Internal.Statistics (<>) :: Statistics -> Statistics -> Statistics # sconcat :: NonEmpty Statistics -> Statistics # stimes :: Integral b => b -> Statistics -> Statistics # | |
Show Statistics Source # | |
Defined in Data.Registry.Internal.Statistics showsPrec :: Int -> Statistics -> ShowS # show :: Statistics -> String # showList :: [Statistics] -> ShowS # |
type Operations = [AppliedFunction] Source #
A list of function applications created when creating a value out of the Registry
data AppliedFunction Source #
A function application with an output value and a list of input values
Instances
Show AppliedFunction Source # | |
Defined in Data.Registry.Internal.Statistics showsPrec :: Int -> AppliedFunction -> ShowS # show :: AppliedFunction -> String # showList :: [AppliedFunction] -> ShowS # |
initStatistics :: Values -> Statistics Source #
Create Statistics from a list of values
valuesSpecializations :: Statistics -> [Specialization] Source #
Return the specializations used during the creation of values
allValuesPaths :: Statistics -> Paths Source #
Return the list of distinct paths from the root of a value graph to leaves of that graph. This can be used to check if a given value was indeed used according to a given specialization
valuePaths :: Value -> Paths Source #
Return all the paths from a given value to all its dependencies
findMostRecentValue :: forall a. Typeable a => Statistics -> Maybe Value Source #
Find the most recently created value of a given type
findCreatedValues :: forall a. Typeable a => Statistics -> [Value] Source #
Find the created values of a given type