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

Safe HaskellNone
LanguageHaskell2010

GHC.Prof

Contents

Synopsis

Documentation

decode :: Text -> Either String Profile Source #

Decode a GHC time allocation profiling report from a lazy Text

Parser

profile :: Parser Profile Source #

Parse a GHC time-allocation profiling report

Cost-centre tree

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.

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.

callSites Source #

Arguments

:: Text

Cost-centre name

-> Text

Module name

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

Build a list of call-sites (caller functions) for a specified cost-centre name and module name.

callSitesOrderBy Source #

Arguments

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

Sorting key function

-> Text

Cost-centre name

-> Text

Module name

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

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

data TotalTime Source #

total time in the profiling reports

Constructors

TotalTime 

Fields

newtype TotalAlloc Source #

total alloc in the profiling reports

Constructors

TotalAlloc 

Fields

data AggregateCostCentre Source #

Constructors

AggregateCostCentre 

Fields

data CostCentre Source #

Cost-centre node

Constructors

CostCentre 

Fields

data CallSite Source #

Constructors

CallSite 

Fields