-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathscript.R
44 lines (36 loc) · 1.43 KB
/
script.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# see `help(run_script, package = 'touchstone')` on how to run this
# interactively
# TODO OPTIONAL Add directories you want to be available in this file or during the
# benchmarks.
# touchstone::pin_assets("some/dir")
# installs branches to benchmark
touchstone::branch_install()
# benchmark a function call from your package (two calls per branch)
touchstone::benchmark_run(
# expr_before_benchmark = source("dir/data.R"), #<-- TODO OTPIONAL setup before benchmark
runif_test = dqrng::dqrunif(1e7), #<- TODO put the call you want to benchmark here
n = 10
)
# benchmark a function call from your package (two calls per branch)
touchstone::benchmark_run(
# expr_before_benchmark = source("dir/data.R"), #<-- TODO OTPIONAL setup before benchmark
rnorm_test = dqrng::dqrnorm(1e7), #<- TODO put the call you want to benchmark here
n = 10
)
# benchmark a function call from your package (two calls per branch)
touchstone::benchmark_run(
# expr_before_benchmark = source("dir/data.R"), #<-- TODO OTPIONAL setup before benchmark
rexp_test = dqrng::dqrexp(1e7), #<- TODO put the call you want to benchmark here
n = 10
)
# TODO OPTIONAL benchmark any R expression (six calls per branch)
# touchstone::benchmark_run(
# more = {
# if (TRUE) {
# y <- yourpkg::f2(x = 3)
# }
# }, #<- TODO put the call you want to benchmark here
# n = 6
# )
# create artifacts used downstream in the GitHub Action
touchstone::benchmark_analyze()