Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions benches/reports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
//!
//! This is a standalone binary (not a criterion benchmark) that prints
//! human-readable comparison tables for cache policy evaluation.
//!
//! ## Value construction convention
//!
//! Benchmark entry points take a `value_for_key: Fn(u64) -> Arc<V>` so callers
//! choose what to store. We pass [`Arc::new`] directly, which the compiler
//! resolves to `fn(u64) -> Arc<u64>`, i.e. the value is the key itself wrapped
//! in `Arc`. Cache-policy measurements (hit/miss, eviction, latency) don't
//! depend on payload contents, so the cheapest possible payload keeps the
//! workload focused on policy behavior rather than allocator/clone cost.

use bench_support as common;
use bench_support::for_each_policy;
Expand Down
9 changes: 9 additions & 0 deletions benches/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
//! JSON results to `target/benchmarks/<run-id>/results.json`.
//!
//! Run with: `cargo bench --bench runner`
//!
//! ## Value construction convention
//!
//! Benchmark entry points take a `value_for_key: Fn(u64) -> Arc<V>` so callers
//! choose what to store. We pass [`Arc::new`] directly, which the compiler
//! resolves to `fn(u64) -> Arc<u64>`, i.e. the value is the key itself wrapped
//! in `Arc`. Cache-policy measurements (hit/miss, eviction, latency) don't
//! depend on payload contents, so the cheapest possible payload keeps the
//! workload focused on policy behavior rather than allocator/clone cost.

use bench_support as common;
use bench_support::for_each_policy;
Expand Down
9 changes: 9 additions & 0 deletions benches/workloads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
//! For micro-ops (get/insert latency), see: `cargo bench --bench ops`
//! For policy-specific operations, see: `cargo bench --bench policy_*`
//! For external crate comparison, see: `cargo bench --bench comparison`
//!
//! ## Value construction convention
//!
//! Benchmark entry points take a `value_for_key: Fn(u64) -> Arc<V>` so callers
//! choose what to store. We pass [`Arc::new`] directly, which the compiler
//! resolves to `fn(u64) -> Arc<u64>`, i.e. the value is the key itself wrapped
//! in `Arc`. Cache-policy measurements (hit/miss, eviction, latency) don't
//! depend on payload contents, so the cheapest possible payload keeps the
//! workload focused on policy behavior rather than allocator/clone cost.

use bench_support as common;
use bench_support::for_each_policy;
Expand Down
Loading