docs(stats): fix misleading/stale comments and rename test_counter

- GC test: cutoff is in the future, so every metric is stale by timestamp
  (not "nothing is stale"); only live handles retain.
- GC loop: drop the inaccurate "no Instant alloc" rationale.
- bench: the handle path no longer calls Instant::now() (it uses fastant);
  reword the HANDLE_TOTAL_WORK rationale.
- rename test_unsafe_counter -> test_counter to match the type rename.
This commit is contained in:
fanyang
2026-06-25 09:16:12 +08:00
parent ebb97fd4f4
commit 1375cd1832
2 changed files with 8 additions and 6 deletions
+3 -2
View File
@@ -31,8 +31,9 @@ use parking_lot::Mutex;
const COUNTER_SHARDS: usize = 16;
const TOTAL_WORK: u64 = 8_000_000;
// The handle path calls `Instant::now()` per `add`, so it is far heavier per op
// than the counter-only groups; use a smaller total to keep the bench fast.
// The handle path does a counter update plus a timestamp `touch` per `add`,
// so it is heavier per op than the counter-only groups; use a smaller total to
// keep the bench fast.
const HANDLE_TOTAL_WORK: u64 = 2_000_000;
const TASK_COUNTS: &[usize] = &[1, 2, 4, 8, 16, 32];