flatProfile: Flat Profile for Rprof Profile Data

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

View source: R/proftools.R

Description

Computes a flat profile reflecting time spent in functions themselves (self) and functions plus callees (total).

Usage

1
flatProfile(pd, byTotal = TRUE, GC = TRUE)

Arguments

pd

profile data as returned by readProfileData.

byTotal

logical; sort by total time if true, self time if not.

GC

logical; include GC information or not.

Details

If byTotal is true then the result is analogous to the by.total component of the result returned by summaryRprof. Otherwise, the result is analogous to the by.self component returned by summaryRprof but with an additional cumulative self times column. The result returned when byTotal is not true is analogous to the flat profile produced by gprof.

Value

A matrix with one row per function recorded in the profile data.

Author(s)

Luke Tierney

References

User manual for gprof, the GNU profiler.

See Also

Rprof, summaryRprof, readProfileData, plotProfileCallGraph, printProfileCallGraph, profileCallGraph2Dot

Examples

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

ltierney/Rpkg-proftools documentation built on July 12, 2020, 5:21 p.m.