Learn R Programming

proftools (version 0.99-3)

styles: Style Specifications for Call Graphs

Description

Styles providing coordinated settings of display parameters for the call graph display functions plotProfileCallGraph and profileCallGraph2Dot.

Usage

plain.style
google.style

Arguments

Value

A list containing the following components:

layout

The layout method to use: One of "dot", "neato", and "twopi".

score

character string specifying whether to use total time or self time for coloring nodes/edges; no color used if missing.

transfer

function; maps score values in unit interval to unit interval

nodeColorMap,edgeColorMap

character vectors of color specifications as produced by rainbow; transfer of score is mapped to color

mergeCycles

logical; whether to merge each cycle of recursion into a single node

edgesColored

logical; whether to color edges

rankDir

The direction that the plot is laid out in, one of either "TB" for Top-to-Bottom or "LR" for Left-to-Right. The default value is "LR". This argument is only useful for dot layouts.

nodeDetails,edgeDetails

logical; whether count information should be shown.

nodeSizeScore

character; value to encode in the size of the nodes.

edgeSizeScore

character; value to encode in the width of the edges.

shape

character; node shape.

maxnodes

integer; maximal number of nodes to use; nodes with lower total hit counts are dropped.

total.pct

numeric; if positive, nodes with hit percentages below this level are dropped.

Details

The plain.style style corresponds to the default parameter settings in the display functions. It can be used as the basis for creating a new custom style.

The google.style style is based on the display style used in the pprof tool from the Google Performance Tools suite.

References

https://gperftools.github.io/gperftools/cpuprofile.html.

See Also

Rprof, flatProfile, summaryRprof, readProfileData, plotProfileCallGraph, printProfileCallGraph, profileCallGraph2Dot

Examples

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

Run the code above in your browser using DataLab