# 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 followed by memory details against 10 commits
plot_metrics(test_path = t_path, metric = "time", n_commits = 10, save_data = F)
plot_metrics(test_path = t_path, metric = "memory", n_commits = 10, save_data = F)
## Example-2
# Obtain both memory and time metrics for each individual testthat block
# inside a file and the file itself. The plots get stored in a directory
# 'Rperform_testMetrics' in the repo's root directory.
plot_metrics(test_path = t_path, metric = "testMetrics", n_commits = 5, save_data = F)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab