Add opt-in memory stability soak to the perf suite - #14
Merged
Conversation
Expose process memory and ACL/session resource sizes on the PROFILE probe, add a long-running steady-state soak with trend analysis, and wire pnpm test:perf:memory behind the existing profile compose overlay. Co-authored-by: Peter Baker <PeterBaker0@users.noreply.github.com>
Commit the 5-minute PROFILE soak report (stable heap, flat ACL rows) and tighten formatBytes output for fractional rates. Co-authored-by: Peter Baker <PeterBaker0@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a long-running memory stability assessment to the performance suite, gated behind the existing opt-in
PROFILE=truepath.Library / probe changes (
PROFILE=trueonly)GET /_couch-auth-proxy/profilenow includesprocess.memoryUsage()plus compact ACL cache / session resource sizesPOST /_couch-auth-proxy/profile/gcbest-effort V8 GC when the process has--expose-gcNODE_OPTIONS=--expose-gc(still opt-in via that overlay)Perf harness
pnpm test:perf:memory(scripts/perf-memory.sh) runs a steady-state ACL load while sampling memorytest/perf/last-memory-results.json+test/perf/last-memory-report.mdPERF_MEMORY_DURATION_SEC); normalpnpm test:perfis unchangeddocs/memory-stability.mdSoak result (this PR)
STABLE — no evidence of a memory leak
How to run
pnpm test:perf:memory # or longer: PERF_MEMORY_DURATION_SEC=600 pnpm test:perf:memory