plotProfileCallGraph        package:proftools        R Documentation

_P_l_o_t _C_a_l_l _G_r_a_p_h _f_o_r _R_p_r_o_f _P_r_o_f_i_l_e _D_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     Uses the graph and Rgraphviz packages to plot a call graph for
     profile data produced by 'Rprof'.

_U_s_a_g_e:

     plotProfileCallGraph(pd, layout = "dot", score = c("total", "self"),
                          transfer = function(x) x, colorMap = NULL,
                          mergeCycles = FALSE, edgesColored = TRUE,
                          rankDir = "LR", ...)

_A_r_g_u_m_e_n_t_s:

      pd: profile data as returned by 'readProfileData'.

  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 

colorMap: character vector 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.

     ...: additional arguments for the 'graphNEL' 'plot' method.

_D_e_t_a_i_l_s:

     Color is used to encode the fraction of total or self time spent
     in each function or call.  The scores used correspond to the
     values in the printed representation produced by
     'printProfileCallGraph'. For now, see the 'gprof' manual for
     further details.  The color encoding for a score 's' and a color
     map 'm' is 'm[ceiling(length(m) * transfer(s))]'

_V_a_l_u_e:

     Used for side effect.

_N_o_t_e:

     Because of lazy evaluation, nested calls like 'f(g(x))' appear in
     the profile graph as 'f' or one of its callees calling 'g'.

_A_u_t_h_o_r(_s):

     Luke Tierney

_R_e_f_e_r_e_n_c_e_s:

     User manual for 'gprof', the GNU profiler.

     Graphviz: <URL: http://www.research.att.com/sw/tools/graphviz/>

_S_e_e _A_l_s_o:

     'Rprof', 'summaryRprof', 'readProfileData', 'flatProfile',
     'printProfileCallGraph', 'profileCallGraph2Dot'

_E_x_a_m_p_l_e_s:

     ## Not run: 
          ## Rprof() is not available on all platforms
          Rprof(tmp <- tempfile())
          example(glm)
          Rprof()
          plotProfileCallGraph(readProfileData(tmp))
          plotProfileCallGraph(readProfileData(tmp), score = "total")
          unlink(tmp)
       
     ## End(Not run)

