get_mem: Test-file's memory statistics.

View source: R/repo_metrics.R

get_memR Documentation

Test-file's memory statistics.

Description

Given a test-file's path, checks its memory metrics against the commit specified by the commit number passed as a parameter. Memory metrics returned are the memory leaked and maximum memory utilized during its execution. A commit number,n, would correspond to the nth commit in the commit log of the current git repository.

Usage

get_mem(test_path, commit_num = 1)

Arguments

test_path

File-path for the test file which is to be checked.

commit_num

commit number in the git log for the current git repository against which the memory stats are to be checked, with the commit number for the most recent commit being 1.

Value

get_mem returns an object of class "data.frame". The data-frame consists of the following columns: test_name metric_name status metric_val message sha date_time

Warning

Function assumes the current directory to be the root directory of the package being tested.

Examples


## Not run: 
## Example-1

# Set the current directory to the git repository concerned.
setwd("./Path/to/repository")

# Specify the test-file path
t_path <- "Path/to/file"

# Pass the parameters and obtain the memory stats
library(Rperform)
get_mem(t_path, 3)

## End(Not run)


analyticalmonk/Rperform documentation built on July 3, 2022, 2:36 a.m.