tvl-depot/tvix/eval/benches/eval.rs
Griffin Smith 29f8f06319 fix(tvix/eval): Fix build of benchmarks
Interpret was updated to take an optional path arg in
6fe5e2d75 (feat(tvix/eval): resolve relative path literals, 2022-08-12),
but since benchmarks aren't building in CI the resulting breakage of
benchmarks was missed.

Change-Id: I8a93f1b25ae62e2d032fafc153d91977c6466712
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6284
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2022-09-02 19:10:34 +00:00

9 lines
286 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", None))));
}
criterion_group!(benches, eval_literals);
criterion_main!(benches);