refactor(stats): rename UnsafeCounter to Counter

The counter is now a plain atomic (no longer UnsafeCell, no longer
sharded), so the "Unsafe" prefix is a misleading leftover. Rename to
Counter. Also fix a stale bench comment that claimed the ShardedAtomic
variant mirrors production.
This commit is contained in:
fanyang
2026-06-25 00:59:49 +08:00
parent 7d249979ea
commit ebb97fd4f4
2 changed files with 11 additions and 9 deletions
+3 -1
View File
@@ -94,7 +94,9 @@ impl Counter for CasSaturating {
// ---------------------------------------------------------------------------
// 3. ShardedAtomic: 16 cache-aligned shards + per-thread shard index.
// Mirrors production `stats_manager::UnsafeCounter`.
// Comparison-only variant (production `stats_manager::Counter` is
// single-atomic; sharding was evaluated and dropped as no benefit for the
// default 1-16 worker deployments).
// ---------------------------------------------------------------------------
thread_local! {