Skip to content

Expand huge_cache_fuzz to cover additional HugeCache operations and accounting invariants: - #962

Draft
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_982894884
Draft

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_982894884

Conversation

@copybara-service

Copy link
Copy Markdown

Expand huge_cache_fuzz to cover additional HugeCache operations and accounting invariants:

  • Verify ReleaseCachedPages(n) size accounting (cache.size() + released == previous_size).
  • Verify ReleaseUnbacked returns r.len and preserves cache.size().
  • Exercise AdvanceClock with simulated durations to trigger demand-based cache shrinking (MaybeGrowCacheLimit / EnsureLimit).
  • Verify AddSpanStats, Print, and PrintInPbtxt consistency (cache.size().in_bytes() + cache.unbacked_released_bytes() == total_mapped).

…nd accounting invariants:

- Verify `ReleaseCachedPages(n)` size accounting (`cache.size() + released == previous_size`).
- Verify `ReleaseUnbacked` returns `r.len` and preserves `cache.size()`.
- Exercise `AdvanceClock` with simulated durations to trigger demand-based cache shrinking (`MaybeGrowCacheLimit` / `EnsureLimit`).
- Verify `AddSpanStats`, `Print`, and `PrintInPbtxt` consistency (`cache.size().in_bytes() + cache.unbacked_released_bytes() == total_mapped`).

PiperOrigin-RevId: 982894884
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant