registry-0.4.0.0: data structure for assembling components
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.Registry.Internal.Statistics

Contents

Description

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 TYPES

data Statistics Source #

This datatype records: - the created values - the applied functions - the specializations used to create values

Constructors

Statistics 

type Operations = [AppliedFunction] Source #

A list of function applications created when creating a value out of the Registry

type Paths = [[Value]] Source #

List of distinct paths from the root of the value graph to a leaf

data AppliedFunction Source #

A function application with an output value and a list of input values

Constructors

AppliedFunction 

Instances

Instances details
Show AppliedFunction Source # 
Instance details

Defined in Data.Registry.Internal.Statistics

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