build(rust): vendor rnix parser crate
This commit was merged in pull request #57.
This commit is contained in:
1 parent
cbdf482422
commit
82ad65a3a4
492 files changed
+67785
-1
No files matched your search
@@ -0,0 +1,15 @@
|
||||
use criterion::{criterion_group, criterion_main, Criterion, Throughput};
|
||||
|
||||
fn all_packages(c: &mut Criterion) {
|
||||
let input = include_str!("all-packages.nix");
|
||||
let mut group = c.benchmark_group("all-packages");
|
||||
group.throughput(Throughput::Bytes(input.len() as u64));
|
||||
group.sample_size(30);
|
||||
group.bench_with_input("all-packages", input, move |b, input| {
|
||||
b.iter(|| rnix::Root::parse(input))
|
||||
});
|
||||
group.finish();
|
||||
}
|
||||
|
||||
criterion_group!(benches, all_packages);
|
||||
criterion_main!(benches);
|
||||
Reference in new issue
Block a user