0c4c307926
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>
9 lines
280 B
Rust
9 lines
280 B
Rust
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);
|