hotPaths: Hot Paths in Profile Data

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/prof.R

Description

Computes and displays hot paths in profiling data.

Usage

1
2
3
hotPaths(pd, value = c("pct", "time", "hits"), self = TRUE,
         srclines = TRUE, GC = FALSE, memory = FALSE, maxdepth = 10,
         self.pct = 0, total.pct = 0, short = ". ", nlines = NA)

Arguments

pd

profile data as returned by readProfileData.

value

character; show result as percentage, time, or hits.

self

logical; include self time for each stack in the result.

srclines

logical; include source information, if available, or not.

GC

logical; include GC information or not.

memory

logical; include memory use information or not.

maxdepth

integer; stacks are truncated to have at most maxdepth elements.

self.pct

numeric; stacks with self percent values below this level are dropped.

total.pct

numeric; stacks with total percent values below this level are dropped.

short

character; abbreviation to be used for functions lower on the stack.

nlines

integer; number of lines to show. The lines shown are the ones with the highest total percentage.

Details

The hot path ordering sorts stacks in the profile data first by the frequency with which the bottom functions on the stack are called, with highest frequency first, then within each bottom function by the frequency of the bottom two, and so on. Examining the result of hotPaths starting with low values of maxdepth and then moving to higher levels is a useful way to expore where the computational effort is concentrated.

Value

A data frame designed to produce a useful printed result.

Author(s)

Luke Tierney

See Also

Rprof, summaryRprof, flatProfile, filterProfileData, readProfileData, plotProfileCallGraph, profileCallGraph2Dot

Examples

1
2
3
pd <- readProfileData(system.file("samples", "glmEx.out", package="proftools"))
hotPaths(pd)
hotPaths(pd, maxdepth = 8)

proftools documentation built on July 8, 2020, 5:20 p.m.