| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
GHC.Prof
Contents
- decode :: Text -> Either String Profile
- profile :: Parser Profile
- data CostCentreTree
- aggregateCostCentres :: Profile -> [AggregateCostCentre]
- aggregateCostCentresOrderBy :: Ord a => (AggregateCostCentre -> a) -> Profile -> [AggregateCostCentre]
- costCentres :: Profile -> Maybe (Tree CostCentre)
- costCentresOrderBy :: Ord a => (CostCentre -> a) -> Profile -> Maybe (Tree CostCentre)
- aggregateCallSites :: Text -> Text -> Profile -> Maybe (AggregateCostCentre, [CallSite AggregateCostCentre])
- aggregateCallSitesOrderBy :: Ord a => (CallSite AggregateCostCentre -> a) -> Text -> Text -> Profile -> Maybe (AggregateCostCentre, [CallSite AggregateCostCentre])
- callSites :: Text -> Text -> Profile -> Maybe (AggregateCostCentre, [CallSite CostCentre])
- callSitesOrderBy :: Ord a => (CallSite CostCentre -> a) -> Text -> Text -> Profile -> Maybe (AggregateCostCentre, [CallSite CostCentre])
- data Profile = Profile {}
- data TotalTime = TotalTime {}
- newtype TotalAlloc = TotalAlloc {}
- data AggregateCostCentre = AggregateCostCentre {
- aggregateCostCentreName :: !Text
- aggregateCostCentreModule :: !Text
- aggregateCostCentreSrc :: !(Maybe Text)
- aggregateCostCentreEntries :: !(Maybe Integer)
- aggregateCostCentreTime :: !Scientific
- aggregateCostCentreAlloc :: !Scientific
- aggregateCostCentreTicks :: !(Maybe Integer)
- aggregateCostCentreBytes :: !(Maybe Integer)
- data CostCentre = CostCentre {
- costCentreNo :: !CostCentreNo
- costCentreName :: !Text
- costCentreModule :: !Text
- costCentreSrc :: !(Maybe Text)
- costCentreEntries :: !Integer
- costCentreIndTime :: !Scientific
- costCentreIndAlloc :: !Scientific
- costCentreInhTime :: !Scientific
- costCentreInhAlloc :: !Scientific
- costCentreTicks :: !(Maybe Integer)
- costCentreBytes :: !(Maybe Integer)
- type CostCentreNo = Int
- data CallSite cc = CallSite {}
Documentation
decode :: Text -> Either String Profile Source #
Decode a GHC time allocation profiling report from a lazy Text
Parser
Cost-centre tree
data CostCentreTree Source #
Instances
aggregateCostCentres :: Profile -> [AggregateCostCentre] Source #
Build a list of cost-centres from a profiling report ordered by the time spent and the amount of allocation.
aggregateCostCentresOrderBy Source #
Arguments
| :: Ord a | |
| => (AggregateCostCentre -> a) | Sorting key function |
| -> Profile | |
| -> [AggregateCostCentre] |
Build a list of cost-centres from a profling report ordered by the given key.
costCentres :: Profile -> Maybe (Tree CostCentre) Source #
Build a tree of cost-centres from a profiling report.
Arguments
| :: Ord a | |
| => (CostCentre -> a) | Sorting key function |
| -> Profile | |
| -> Maybe (Tree CostCentre) |
Build a tree of cost-centres from a profiling report. Nodes are sorted by the given key function for each level of the tree.
Arguments
| :: Text | Cost centre name |
| -> Text | Module name |
| -> Profile | |
| -> Maybe (AggregateCostCentre, [CallSite AggregateCostCentre]) |
Build a list of call sites (caller functions of a cost centre) aggregated by their cost centre names and module names.
aggregateCallSitesOrderBy Source #
Arguments
| :: Ord a | |
| => (CallSite AggregateCostCentre -> a) | Sorting key function |
| -> Text | Cost centre name |
| -> Text | Module name |
| -> Profile | |
| -> Maybe (AggregateCostCentre, [CallSite AggregateCostCentre]) |
Build a list of call sites (caller functions of a cost centre) aggregated by their cost centre names and module names. Call sites are sorted by the given key function.
Arguments
| :: Text | Cost-centre name |
| -> Text | Module name |
| -> Profile | |
| -> Maybe (AggregateCostCentre, [CallSite CostCentre]) |
Build a list of call-sites (caller functions) for a specified cost-centre name and module name.
Arguments
| :: Ord a | |
| => (CallSite CostCentre -> a) | Sorting key function |
| -> Text | Cost-centre name |
| -> Text | Module name |
| -> Profile | |
| -> Maybe (AggregateCostCentre, [CallSite CostCentre]) |
Build a list of call-sites (caller function) for a specified cost-centre name and module name. Nodes are sorted by the given key function.
Types
Top-level profiling report
Constructors
| Profile | |
total time in the profiling reports
Constructors
| TotalTime | |
Fields
| |
newtype TotalAlloc Source #
total alloc in the profiling reports
Constructors
| TotalAlloc | |
Fields
| |
Instances
data AggregateCostCentre Source #
Constructors
| AggregateCostCentre | |
Fields
| |
data CostCentre Source #
Cost-centre node
Constructors
| CostCentre | |
Fields
| |
Instances
type CostCentreNo = Int Source #
Constructors
| CallSite | |
Fields
| |