caelum0x 8af85c6e28 style: format workspace to rustfmt.toml (use_small_heuristics = Max)
Bring the whole workspace into compliance with the repo's rustfmt config
(edition 2024, max_width 100, use_small_heuristics = "Max"), which had drifted
across many crates. Pure formatting — no logic changes; `cargo fmt --check` is
now clean and `cargo build --workspace` is green.
2026-08-18 16:59:40 +03:00

19 lines
596 B
Rust

use lawsynth_store::{MemoryStore, ObjectKey, ObjectStore};
use std::hint::black_box;
use std::time::Instant;
fn main() {
let store = MemoryStore::default();
let start = Instant::now();
let mut bytes = 0usize;
for index in 0..10_000 {
let payload = vec![index as u8; 256];
bytes += payload.len();
store.put(ObjectKey::new(format!("throughput/{index}")).unwrap(), payload).unwrap();
}
black_box(store.object_count());
println!(
"memory object writes: {} MiB/s",
bytes as f64 / start.elapsed().as_secs_f64() / 1_048_576.0
);
}