Simple Memory Profiling for R

A simple and light-weight API for memory profiling of R expressions. The profiling is built on top of R's built-in memory profiler ('utils::Rprofmem()'), which records every memory allocation done by R (also native code).


News

Package: profmem

Version: 0.5.0 [2018-01-30]

SIGNIFICANT CHANGES:

o Nested profmem() calls are now supported, such that inner profmem() calls will not affect outer ones. This allows, for instance, a package to use profmem internally without having to worry about profmem already being active when its functions are called.

NEW FEATURES:

o Added profmem_begin() and profmem_end() as an alternative to profmem().

o Added profmem_suspend() and profmem_resume() for suspending and resuming an active profmem session.

o Added profmem_status() for checking whether profmem is inactive, active, or suspended.

o Added profmem_depth() to get the current depth of nested profmem sessions.

o print() for Rprofmem now reports on the threshold used, if known.

o print() for Rprofmem gained arguments 'expr = TRUE' and 'newpage = FALSE', controlling whether the profiled R expression and 'new page' entries should be displayed or not.

o Added option 'future.threshold' for controlling the default threshold level for profmem() and profmem_begin().

DOCUMENTATION:

o VIGNETTE: Updated the example in Section 'An example where memory profiling can make a difference' due to improvements in R (>= 3.4.0), which made the previous example no longer valid.

o help("profmem") how provide much more details previously only available in the vignette.

BUG FIX:

o readRprofmem() failed to "workaround" another buggy Rprofmem() output.

Version: 0.4.0 [2016-09-14]

NEW FEATURES:

o profmem() now returns a data.frame of class Rprofmem.

o profmem() gained argument threshold.

CODE QUALITY:

o 100% test coverage.

Version: 0.3.0 [2016-08-06]

DOCUMENTATION:

o Added vignette.

Version: 0.2.1 [2016-07-11]

NEW FEATURES:

o Added readRprofmem().

Version: 0.2.0 [2016-06-05]

NEW FEATURES:

o Added total() to get the total number of bytes allocated.

o profmem() returns also when evaluating the expression gives an error.

Version: 0.1.0 [2016-06-04]

SIGNIFICANT CHANGES:

o Added profmem().

o Package created.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("profmem")

0.5.0 by Henrik Bengtsson, a year ago


https://github.com/HenrikBengtsson/profmem


Report a bug at https://github.com/HenrikBengtsson/profmem/issues


Browse source code at https://github.com/cran/profmem


Authors: Henrik Bengtsson [aut, cre, cph]


Documentation:   PDF Manual  


LGPL (>= 2.1) license


Imports utils

Suggests R.rsp, markdown, microbenchmark


Imported by bench.


See at CRAN