plot_directory | R Documentation |
Given a directory path, plot the memory and time usage statistics of all files in the directory against the commit message summaries of the specified number of commits in the current git repository.
plot_directory(test_directory, metric = "testMetrics", num_commits = 5, save_data = FALSE, save_plots = TRUE)
test_directory |
Directory containing the test-files which are to be used. |
metric |
Type of plot(s) desired. This can be set to |
num_commits |
Number of commits (versions) against which the files are to be tested, with default being 5. |
save_data |
If set to TRUE, the metrics data is saved in a folder 'Rperform_Data' in the current directory. |
save_plots |
If set to TRUE, the plots generated are stored in the 'Rperform_plots' directory in the root of the repo rather than being printed. |
Library assumes the current directory to be the root directory of the package being tested.
## 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) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.