Skip to content

Obtaining package performance data using Rperform

Akash Tandon edited this page Jul 7, 2016 · 5 revisions

Rperform provides functions which can be used to obtain data containing information about a package's performance. Currently, there are two classes of functions which return performance data. They respectively deal with:

These functions, like most of the other Rperform functions, are designed to work in harmony with hadley's testthat package. However, they will work fine with the packages not employing testthat as well. Read on for further explanation.


Performance metrics

These functions can be used to obtain data about the following metrics:

Runtime

One can use Rperform to obtain the runtime of a test-file and the testthat code blocks it contains, if any.

Memory usage

One can use Rperform to obtain the memory usage details of a test-file and the testthat code blocks it contains, if any. There are two types of memory-related metrics which can be obtained:

  • Maximum memory utilized: This is the maximum system memory utilized by the file/block during the course of its execution.
  • Total memory leaked: This is the difference in the amount of system memory being used at the end and start of a file or block's execution.

Commits on a single branch

Examples

Note: For each individual commit, three values of a particular metric are measured. Hence, the multiple values for a single commit exist in the dataframes. Many a times the values simply overlap.


Commits across two branches

Examples