atime_test {atime} | R Documentation |
Define an atime performance test.
Description
Use this to define an element of your test.list
in
atime/tests.R, prior to running atime_pkg
.
Usage
atime_test(
N, setup, expr, times, seconds.limit, verbose,
pkg.edit.fun, result, ...)
Arguments
N |
numeric vector of data sizes to vary. |
setup |
expression to evaluate for every data size, before timings.
In contrast to |
expr |
code with package double-colon prefix, for example
|
times |
number of times to evaluate each timed expression. |
seconds.limit |
if the median timing of any expression exceeds this many seconds, then no timings for larger N are computed. |
verbose |
logical, print messages after every data size? |
pkg.edit.fun |
function called to edit package before installation, should typically replace instances of PKG with PKG.SHA, default works with Rcpp packages. |
result |
logical, save results? (default FALSE) |
... |
named versions. |
Value
List of expressions.
Author(s)
Toby Dylan Hocking
See Also
atime_test_list
for defining common arguments in each
element of the test list,
atime_pkg
for running tests.
Examples
atime::atime_test(
N=c(1,10),
setup=data.vec <- rnorm(N),
expr=binsegRcpp::binseg("mean_norm",data.vec))
## https://github.com/tdhock/binsegRcpp/blob/atime-test-funs/.ci/atime/tests.R
## has a real example, see how to run it in tests/testthat/test-versions.R