Skip to content

fix: replace self-dividing HighMemoryUsage alert expression - #30

Open
pistakugli wants to merge 1 commit into
weilixiong:mainfrom
pistakugli:fix/memory-alert-expr
Open

fix: replace self-dividing HighMemoryUsage alert expression#30
pistakugli wants to merge 1 commit into
weilixiong:mainfrom
pistakugli:fix/memory-alert-expr

Conversation

@pistakugli

Copy link
Copy Markdown

Problem

The HighMemoryUsage alert used process_resident_memory_bytes / process_resident_memory_bytes > 0.9 which is self-dividing and always evaluates to 1, making the alert unreliable.

Solution

Replaced the self-dividing expression with process_resident_memory_bytes / machine_memory_bytes > 0.9 to compare against actual system memory.

Changes

  • tools/monitoring_setup.py: Fixed the alert expression
  • tools/test_monitoring.py: Added validation test to catch self-dividing expressions

Validation

  • Ran python3 tools/test_monitoring.py — PASS
  • Existing monitoring setup behavior unchanged

Fixes #1

Wallet: 0xb7419c92b1d93251c0c85b756b390b29ab8162e0 (Polygon)

The HighMemoryUsage alert was using process_resident_memory_bytes /
process_resident_memory_bytes which always evaluates to 1. Replaced
with process_resident_memory_bytes / machine_memory_bytes to compare
against actual system memory.

Added validation test to catch self-dividing alert expressions.

Fixes weilixiong#1
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