Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/prof.R View source: R/prof.R
Allow profile data to be filtered on several criteria.
1 | filterProfileData(pd, ..., normalize = FALSE, regex = FALSE)
|
pd |
profile data as returned by |
... |
filter specifications is |
normalize |
logical; if true the total hit count is set to the total number of hits in the reduced profile data; otherwise the original value is retained. |
regex |
logical; if true the specifications in |
This function can be used to make plots and summaries more readable or relevant by removing functions that are not of direct interest or have low hit counts.
Filters are specified in filter = value form with value
typically specifying a filter level or argument. Possible filters and
their argument values are:
selectcharacter vector specifying names of functions; call stacks not containing functions matching any of these names are dropped.
omitcharacter vector specifying names of functions; call stacks containing functions matching any of these names are dropped.
focuscharacter vector specifying names of functions; call
stacks not containing functions matching any of these names are
dropped, and functions at the bottom of the stack not matching the
focus specification are dropped.
skipinteger; the number of elements to trim from the bottom of the stacks.
maxdepthinteger; stacks are truncated to have at most
maxdepth elements.
self.pctnumeric; functions at the bottom of the stacks with self percentages below this value are removed.
total.pctnumeric; functions at the top of the stacks with total percentages below this value are removed.
intervalinter vector of length 2 specifying first and last sample to use.
merge.pctnumeric; functions at the top of the stacks are removed and stack traces merged until each retained trace accounts for at least this percentage of run time.
A reduced profile data structure.
Luke Tierney
Rprof,
summaryRprof,
flatProfile,
readProfileData,
plotProfileCallGraph,
profileCallGraph2Dot
1 2 3 4 5 6 | pd <- readProfileData(system.file("samples", "glmEx.out", package="proftools"))
plotProfileCallGraph(pd)
plotProfileCallGraph(filterProfileData(pd, self.pct = 1))
plotProfileCallGraph(filterProfileData(pd, self.pct = 1, total.pct = 10))
plotProfileCallGraph(filterProfileData(pd, select = "glm", self.pct=1,
total.pct=10))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.