Skip to content

Commit 5c2e457

Browse files
committed
Add r-microbenchmark
1 parent a45c402 commit 5c2e457

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
context:
2+
name: r-microbenchmark
3+
version: "1.5.0"
4+
5+
package:
6+
name: ${{ name }}
7+
version: ${{ version }}
8+
9+
source:
10+
url:
11+
- https://cran.r-project.org/src/contrib/microbenchmark_${{ version }}.tar.gz
12+
- https://cloud.r-project.org/src/contrib/microbenchmark_${{ version }}.tar.gz
13+
sha256: 3d1e92a9206811ad128b28795d20a0d31da5f0c29ea7f1caaf1194ed3e49765f
14+
15+
build:
16+
number: 0
17+
script: $R CMD INSTALL $R_ARGS .
18+
19+
requirements:
20+
build:
21+
- cross-r-base_${{ target_platform }} ==${{ r_base }}
22+
- ${{ compiler('c') }}
23+
host:
24+
- r-base ==${{ r_base }}
25+
26+
tests:
27+
- package_contents:
28+
lib:
29+
- R/library/microbenchmark/libs/microbenchmark.so
30+
- script: run_r_test test_microbenchmark.R
31+
files:
32+
recipe:
33+
- test_microbenchmark.R
34+
requirements:
35+
build:
36+
- r-wasm-tester
37+
38+
about:
39+
homepage: https://github.com/joshuaulrich/microbenchmark
40+
repository: https://github.com/joshuaulrich/microbenchmark
41+
license: BSD-2-Clause
42+
license_file: LICENSE
43+
summary: Accurate Timing Functions
44+
45+
extra:
46+
recipe-maintainers:
47+
- anutosh491
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
library(microbenchmark)
2+
3+
result <- microbenchmark(sqrt(2), times = 10L)
4+
stopifnot(!is.null(result))

0 commit comments

Comments
 (0)