atime_test_list {atime}R Documentation

Define an atime performance test list.

Description

Use this to define test.list in your atime/tests.R file, prior to running atime_pkg. Arguments in ... and tests are combined to form the test list, and other arguments are copied to each element of the test list.

Usage

atime_test_list(
  ...,
  N, setup, expr, times, seconds.limit,
  verbose, pkg.edit.fun, result,
  tests = NULL)

Arguments

...

names for tests, values are lists of arguments to pass to atime_versions (combined with tests).

tests

list of tests, with names for tests, values are lists of arguments to pass to atime_versions (combined with ...).

N

integer vector of data sizes.

setup

expression that depends on N, to run before timings.

expr

expression to time.

times

number of times to run expr.

seconds.limit

number of seconds after which we stop trying larger N.

verbose

logical: print output?

pkg.edit.fun

function for editing package prior to testing.

result

logical: save results?

Value

List representing performance tests, each element is a list of arguments to pass to atime_versions.

Author(s)

Toby Dylan Hocking

See Also

atime_test for defining each test, atime_pkg for running tests.

Examples


(test.list <- atime::atime_test_list(
  N=as.integer(10^seq(1,3,by=0.5)),
  setup={
    set.seed(1)
    data.vec <- rnorm(N)
  },
  mean_norm=atime::atime_test(expr=binsegRcpp::binseg("mean_norm",data.vec)),
  poisson=atime::atime_test(expr=binsegRcpp::binseg("poisson",data.vec)),
  NULL))

## 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


[Package atime version 2024.4.23 Index]