atime_test_list: Define an atime performance test list.

atime_test_listR 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 ... should all be named; if name is an argument of atime_versions, it will be copied to each test; otherwise it should be the name of a test.

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. Not evaluated before copying to each test.

expr

expression to time. Not evaluated before copying to each test.

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, from ... and 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.named <- 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


atime documentation built on April 12, 2025, 1:12 a.m.

Related to atime_test_list in atime...