# NOT RUN {
# }
# NOT RUN {
# Set to the git repository in consideration.
setwd("path/to/repo")
d_path <- "path/to/tests"
# Load the library
library(Rperform)
## Example-1
# Pass the parameters and obtain the run-time followed by memory details against 10 commits.
plot_directory(test_directory = d_path, metric = "time", num_commits = 10,
save_data = F, save_plots = T)
plot_directory(test_directory = d_path, metric = "memory", num_commits = 10,
save_data = F, save_plots = T)
## Example-2
# Obtain both memory and time metrics for each individual testthat block
# inside a file and the file itself ,and save the resulting plot as well as
# data.
plot_directory(d_path, metric = "testMetrics", num_commits = 5, save_data = F,
save_plots = T)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab