| plot_webpage | R Documentation |
It plots specified metrics for all the tests present in the specified directory of the current git repository on a webpage.
plot_webpage(test_directory = "tests/testthat", metric = "testMetrics", output_name = "RperformTest.html")
test_directory |
Path of the directory containing the test files. |
metric |
Type of plot(s) desired. This can be set to |
output_name |
Name of the output .html file. |
Function assumes the current directory to be the root directory of the repository 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
# on two seperate webpages (html files).
plot_webpage(test_directory = d_path, metric = "time", output_name = "timePage")
plot_metrics(test_directory = d_path, metric = "memory", output_name = "memPage")
## Example-2
# Obtain both memory and time metrics for each individual testthat block
# inside a file and the file itself.
plot_webpage(d_path, metric = "testMetrics", output_name = "testMetricsPage")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.