Expand description
v7.37.7 (mailrs cascade contention round 2 instrumentation) —
runtime counters to disambiguate samply attribution.
samply reported 67.8% CPU in MemoizeCache::new + drop_in_place
under 20-worker stress, but K01 (eager-alloc → lazy) didn’t move
cascade amplification — suggesting either the attribution was off
or the eager 96 KB alloc isn’t the dominant cost. These counters
provide ground truth: how many times is new() actually called,
how many entries does any cache ever hold, how many caches die
empty. Read once at end of bench via MemoizeCache::counter_snapshot().
Counters use Relaxed atomic ops (visibility, no synchronization). Cost per op is sub-ns and does not introduce contention.