11# see `help(run_script, package = 'touchstone')` on how to run this
22# interactively
33
4- # TODO OPTIONAL Add directories you want to be available in this file or during the
5- # benchmarks.
6- # touchstone::pin_assets("some/dir")
7-
84# installs branches to benchmark
95touchstone :: branch_install()
106
117# some setup
12- genmax <- 10L
13- g_patho_init <- genmax / 2
14- initial_infections <- 5L
15- tmax = 100
16- popsize = 100
17- scenario = 1
18-
198# benchmark a function call from your package (two calls per branch)
209touchstone :: benchmark_run(
21- # expr_before_benchmark = source("dir/data.R"), #<-- TODO OTPIONAL setup before benchmark
22- random_test = pathomove :: run_pathomove(
10+ expr_before_benchmark = {
11+ genmax <- 100L
12+ g_patho_init <- genmax / 2
13+ initial_infections <- 5L
14+ tmax = 100
15+ popsize = 100
16+ scenario = 1
17+ }, # <-- TODO OTPIONAL setup before benchmark
18+ simple_case = pathomove :: run_pathomove(
2319 scenario = scenario ,
2420 popsize = popsize ,
2521 initialInfections = initial_infections ,
@@ -30,16 +26,5 @@ touchstone::benchmark_run(
3026 n = 2
3127)
3228
33- # TODO OPTIONAL benchmark any R expression (six calls per branch)
34- # touchstone::benchmark_run(
35- # more = {
36- # if (TRUE) {
37- # y <- yourpkg::f2(x = 3)
38- # }
39- # }, #<- TODO put the call you want to benchmark here
40- # n = 6
41- # )
42-
43-
4429# create artifacts used downstream in the GitHub Action
4530touchstone :: benchmark_analyze()
0 commit comments