Skip to content

fix(tools): correct HighMemoryUsage PromQL ratio (#1) - #24

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

fix(tools): correct HighMemoryUsage PromQL ratio (#1)#24
yanyishuai wants to merge 1 commit into
weilixiong:mainfrom
yanyishuai:bounty/issue-1-high-memory-alert

Conversation

@yanyishuai

Copy link
Copy Markdown

Summary

Fixes the HighMemoryUsage alert so it compares process resident memory against machine_memory_bytes instead of dividing process_resident_memory_bytes by itself (which always evaluates to 1).

Changes

  • tools/monitoring_setup.py — corrected PromQL ratio + validate_alert_rules() guard for self-dividing expressions
  • tools/tests/test_monitoring_alert_exprs.py — regression coverage for recommended rules and broken expressions

Validation

python -m unittest tools.tests.test_monitoring_alert_exprs -v
python tools/monitoring_setup.py --validate
python build.py -m compliance

Dry-run alert upload behavior is unchanged aside from the corrected expression.

Closes #1

Solana wallet for bounty payout: Do4v7foHJvRJLpRRoGaVPWX6DDEjX3yTK7J91gpwUQpE

@yanyishuai

Copy link
Copy Markdown
Author

External bounty ready for maintainer review — acceptance criteria documented in PR body. Happy to address feedback immediately.

@yanyishuai
yanyishuai force-pushed the bounty/issue-1-high-memory-alert branch from fc6aade to b5f3d5e Compare July 1, 2026 09:47
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.

[$30 BOUNTY] [Python] Fix HighMemoryUsage alert ratio expression

1 participant