time_branch: Run-times of a file on the given branch.

View source: R/branch_metrics.R

time_branchR Documentation

Run-times of a file on the given branch.

Description

Given a test-file and branch, returns the run-time details of the file over the given number of commits on the branch.

Usage

time_branch(test_path, branch = "master", num_commits = 5)

Arguments

test_path

File-path for the test file to be tested.

branch

Branch against whose commits the test file is to be tested (with master being the default).

num_commits

Number of commits on the branch against which the test file is to be tested.

Value

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

Warning

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

Examples


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

# Set the file-path
t_path <- "Path/to/file"

# Load the library and pass the parameters to the function
library(Rperform)
time_branch(test_path = t_path, branch_name = "helper", num_commits = 10)

## End(Not run)

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