# NOT RUN {
# }
# NOT RUN {
# Set the current directory to the git repository concerned.
setwd("./Path/to/repository")
# Specify the test-file path
t_path <- "Path/to/file"
# Load the library
library(Rperform)
## Example-1
# Pass the parameters and obtain the run-time details for branches, 'experiment' and
'master'.
# Since branch2 is not specified in this case, it's assumed to be 'master'.
plot_branchmetrics(test_path = t_path, metric = "time", branch1 = 'experiment', save_data = F)
# Pass the parameters and obtain the memory details.
plot_branchmetrics(test_path = t_path, metric = 'memory',
branch1 = 'experiment_1', branch2 = 'experiment_2')
## Example-2
# Obtain both memory and time metrics for each individual testthat block
# inside a file, and those for the file itself. Same as the other metric
# cases, metrics both the commits are plotted. The plots get stored in a
# directory 'Rperform_testMetrics' in the repo's root directory.
plot_metrics(test_path = t_path, metric = "testMetrics", branch1 = "experiment")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab