Learn R Programming

Rperform (version 0.0.0.9000)

compare_dirt: Run-time details across directories/repositories.

Description

Given a test-file, two directories and their corresponding branches, returns the run-time details of the file against the first commit till the latest common commit in branch1 of dir1, and against the latest commit in branch2 of dir2.

Usage

compare_dirt(dir1, test_path1, branch1 = "master", dir2, test_path2, branch2 = "master")

Arguments

dir1
Path to the first directory/repository.
test_path1
File-path, relative to the first directory, for the test file to be tested.
branch1
Branch in the first repository against whose commits the test file is to be tested.
dir2
Path to the second directory/repository.
test_path2
File-path, relative to the second directory, for the test file to be tested.
branch2
Branch in the second directory against whose commits the test file is to be tested.

Value

compare_brancht 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 directory

Warning

Function assumes the current directory to be the parent directory of both the repositories being tested. That means both the repositories should be inside the same directory.

Examples

Run this code

## Not run: 
# # Set the current directory to the parent directory of the concerned repositories.
# setwd("./Path/to/parent/directory")
# 
# # Set the directory paths
# d_path1 <- "Path/to/first/directory"
# d_path2 <- "Path/to/second/directory"
# 
# # Set the file-paths
# t_path1 <- "First/path/to/file"
# t_path2 <- "Second/path/to/file"
# 
# # Load the library and pass the parameters to the function
# library(Rperform)
# compare_dirt(d_path1, t_path1, branch1 = "master",
#              d_path2, t_path2, branch2 = "patch")
# ## End(Not run)

Run the code above in your browser using DataLab