ghc-prof-1.3.0: Library for parsing GHC time and allocation profiling reports

Safe HaskellNone
LanguageHaskell2010

GHC.Prof.CostCentreTree

Contents

Synopsis

Cost center breakdown

Aggregate cost centres

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.

Cost centre trees

costCentres :: Profile -> Maybe (Tree CostCentre) Source #

Build a tree of cost-centres from a profiling report.

costCentresOrderBy Source #

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.

Call site breakdown

Aggregate call sites

aggregateCallSites Source #

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.

Call sites

callSites Source #

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.

callSitesOrderBy Source #

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.

Module breakdown

aggregateModules :: Profile -> [AggregateModule] Source #

Break down aggregate cost centres by module sorted by total time and allocation.

aggregateModulesOrderBy Source #

Arguments

:: Ord a 
=> (AggregateModule -> a)

Sorting key function

-> Profile 
-> [AggregateModule] 

Break odwn aggregate cost centres by module.

Low level functions

buildCostCentresOrderBy Source #

Arguments

:: Ord a 
=> (CostCentre -> a)

Sorting key function

-> CostCentreTree 
-> Maybe (Tree CostCentre) 

buildCallSitesOrderBy Source #

Arguments

:: Ord a 
=> (CallSite CostCentre -> a)

Sorting key function

-> Text

Cost-centre name

-> Text

Module name

-> CostCentreTree 
-> Maybe (AggregateCostCentre, [CallSite CostCentre]) 

buildAggregateCallSitesOrderBy Source #

Arguments

:: Ord a 
=> (CallSite AggregateCostCentre -> a)

Sorting key function

-> Text

Cost centre name

-> Text

Module name

-> CostCentreTree 
-> Maybe (AggregateCostCentre, [CallSite AggregateCostCentre])