proftools (version 0.99-3)

flatProfile: Flat Profile for Rprof Profile Data

Description

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

Usage

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.

Value

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

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.

References

User manual for gprof, the GNU profiler.

See Also

Rprof, summaryRprof, readProfileData, plotProfileCallGraph, printProfileCallGraph, profileCallGraph2Dot

Examples

Run this code
# NOT RUN {
pd <- readProfileData(system.file("samples", "glmEx.out", package="proftools"))
flatProfile(pd)
flatProfile(pd, FALSE)
# }

Run the code above in your browser using DataLab