diff options
author | Griffin Smith <grfn@gws.fyi> | 2022-08-25T15·04-0400 |
---|---|---|
committer | grfn <grfn@gws.fyi> | 2022-08-25T16·03+0000 |
commit | 0c4c307926232549f7cfca8f584fb66c31f60bf2 (patch) | |
tree | 8feba18ba43b8b6e017f0d7301452d6d2b896ccd /tvix/eval/benches/eval.rs | |
parent | f648cec78e9115527e4c135a9e3f7083abe9e5be (diff) |
feat(tvix/eval): Add initial benchmarking infrastructure r/4489
Bootstrap some (initially very simple, mostly proof-of-concept) benchmarking infrastructure using Criterion, using the newly-exposed lib from tvix-eval. Change-Id: I4bb93c142ba8d018d7e67e58ac8907a0429398a5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6156 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval/benches/eval.rs')
-rw-r--r-- | tvix/eval/benches/eval.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tvix/eval/benches/eval.rs b/tvix/eval/benches/eval.rs new file mode 100644 index 000000000000..a97adf02db50 --- /dev/null +++ b/tvix/eval/benches/eval.rs @@ -0,0 +1,9 @@ +use criterion::{black_box, criterion_group, criterion_main, Criterion}; +use tvix_eval::interpret; + +fn eval_literals(c: &mut Criterion) { + c.bench_function("int", |b| b.iter(|| black_box(interpret("42")))); +} + +criterion_group!(benches, eval_literals); +criterion_main!(benches); |