flatProfile            package:proftools            R Documentation

_F_l_a_t _P_r_o_f_i_l_e _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:

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

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

     flatProfile(pd, byTotal = TRUE)

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

      pd: profile data as returned by 'readProfileData'.

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

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

     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'.

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

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

_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.

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

     'Rprof', 'summaryRprof', 'readProfileData',
     'plotProfileCallGraph', '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()
          flatProfile(readProfileData(tmp))
          flatProfile(readProfileData(tmp), FALSE)
          unlink(tmp)
       
     ## End(Not run)

