Description Usage Arguments Details Value Author(s) See Also Examples
Return profile data collected while evaluating an expression.
1 | profileExpr(expr, GC = TRUE, srclines = TRUE, memory = TRUE)
|
expr |
Valid R expression to be profiled. |
srclines |
logical; include source information, if available, or not. |
GC |
logical; include GC information or not. |
memory |
logical; include memory use information or not. |
profileExpr uses Rprof to profile execution of
expr and returns the profile data read in using
readProfileData. By default GC and source information
are included in the profile data. If memory profiling is supported,
memory use information is also included by default.
R representation of Rprof data.
Luke Tierney
Rprof,
funSummary,
srcSummary,
plotProfileCallGraph,
1 2 3 4 5 6 7 8 9 10 11 12 | ## This defines the function rw()
source(system.file("samples", "rw.R", package="proftools"))
## Execute the function and collect profile data
pd <- profileExpr(rw(200000))
## Examine the profiel data
funSummary(pd)
callSummary(pd)
hotPaths(pd)
srcSummary(pd)
plotProfileCallGraph(pd)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.