You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The official library for writing _samplers_ (a.k.a Scaled Fuzzers) for the [Aiken](https://aiken-lang.org) Cardano smart-contract language.
11
+
12
+
> ### ⚠️ WARNING
13
+
>
14
+
> **IMPORTANT:** This is a work in progress and the API is not stable yet; additionally Samplers are not yet supported in the current version of Aiken (v1.1.9).
15
+
16
+
## Installation
17
+
18
+
```
19
+
aiken add aiken-lang/bench --version v0.0.0
20
+
```
21
+
22
+
## Getting started
23
+
24
+
First, make sure you have the [Aiken's user manual about tests](https://aiken-lang.org/language-tour/tests#property-based-test); in particular the section about benchmarking functions.
25
+
26
+
In many situations, you can use primitives from this library out-of-the-box, composing them inline when necessary. For example, if you need a growing non-empty list of values, you can simply write:
27
+
28
+
```
29
+
use aiken/bench
30
+
31
+
bench my_bench(xs via bench.list(bench.int(Linear(1)), Linear(1))) {
32
+
// some function
33
+
}
34
+
```
35
+
36
+
You can also write your own more complex sampler. Note that writing good samplers can be complicated, so here are a few guiding principles you should follow.. TODO
0 commit comments