Skip to content

Fix HighMemoryUsage alert ratio - #22

Open
mirzakah wants to merge 1 commit into
weilixiong:mainfrom
mirzakah:bounty/high-memory-alert-ratio
Open

Fix HighMemoryUsage alert ratio#22
mirzakah wants to merge 1 commit into
weilixiong:mainfrom
mirzakah:bounty/high-memory-alert-ratio

Conversation

@mirzakah

Copy link
Copy Markdown

Summary

Refs #1. Fixes the recommended HighMemoryUsage Prometheus alert so it no longer divides process_resident_memory_bytes by itself. The rule now compares process resident memory to machine_memory_bytes using on(instance) vector matching while keeping the existing threshold and alert metadata.

Changes

  • Replaced the self-dividing HighMemoryUsage expression with a real memory usage ratio.
  • Added a stdlib smoke test that can run directly with Python or under pytest and catches this regression.
  • Included diagnostic/build-8c3fd31c.json from the required python3 build.py run.

Testing

  • python3 tools/test_monitoring_setup_memory_alert.py passed.
  • /Users/mirzakahrovic/Documents/codex-bounty-grinder/.venv/bin/python -m pytest tools/test_monitoring_setup_memory_alert.py -q passed.
  • python3 -m py_compile tools/monitoring_setup.py tools/test_monitoring_setup_memory_alert.py passed.
  • git diff --check HEAD~1..HEAD passed.
  • python3 build.py ran and generated diagnostic/build-8c3fd31c.json; 3/10 modules passed (frontend, market, v2-market-stream). The remaining failures are local toolchain/environment failures (cargo, cmake, Java runtime, luac, ghc) plus the existing macOS frailbox MAP_HUGETLB compile issue.
  • .logd creation failed locally with encryptly error b400a134ad13c8d7c8e3; the diagnostic JSON records this failure.

Checklist

  • Relevant Python tool smoke test passes locally
  • Tests pass locally
  • Diagnostic build log is committed in this PR (.logd creation failed locally; diagnostic JSON is committed)
  • Documentation has been updated, if applicable
  • Configuration or schema changes are documented, if applicable
  • No generated build artifacts are committed, except the diagnostic build metadata
  • Changes are scoped to the PR purpose and avoid unrelated cleanup
  • Security, privacy, and error-handling implications have been considered

  • I would like to request that my diagnostic build log is removed before merging

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