Add read-update-write benchmark
Update the README with a new benchmark group and performance results. Include new data files and update the Rust benchmark implementation. Regenerate UPB bindings and fix a data path in the C benchmark runner.
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
//! - `iterate` — counting repeated fields at different nesting depths
|
||||
|
||||
use criterion::{BenchmarkId, Criterion, Throughput, criterion_group, criterion_main};
|
||||
use roto_benches::hackers::{Campaign, Hacker, Operation, Worm};
|
||||
use roto_benches::hackers::{Campaign, CampaignBuilder, Hacker, Operation, Worm};
|
||||
use std::hint::black_box;
|
||||
|
||||
// =============================================================================
|
||||
@@ -223,9 +223,11 @@ fn bench_read_update_write(c: &mut Criterion) {
|
||||
let mut buf = vec![0u8; data.len() * 2];
|
||||
let res = CampaignBuilder::builder(&mut buf)
|
||||
.name("updated")
|
||||
.unwrap()
|
||||
.with(&campaign)
|
||||
.unwrap()
|
||||
.finish();
|
||||
black_box(res)
|
||||
black_box(res.unwrap().len())
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user