Skip to content

feat: add memory leak monitoring for load tests#357

Merged
LaGodxy merged 1 commit into
MettaChain:mainfrom
shaaibu7:feature/memory-leak-monitoring
Apr 24, 2026
Merged

feat: add memory leak monitoring for load tests#357
LaGodxy merged 1 commit into
MettaChain:mainfrom
shaaibu7:feature/memory-leak-monitoring

Conversation

@shaaibu7
Copy link
Copy Markdown
Contributor

Add memory leak monitoring for long-running load tests

Description
This PR adds memory leak monitoring to the PropChain load-test suite so long-running endurance runs can detect RSS growth and teardown
drift, not just throughput regressions.

What changed

  • Added a lightweight process RSS sampler to tests/load_tests.rs
  • Added memory growth reporting and bounded leak assertions for endurance/scalability sessions
  • Added new long-running test coverage:
    • endurance_test_short
    • endurance_test_sustained_load
    • scalability_test_memory_usage
  • Updated the load-test runners to invoke the correct library test targets
  • Updated load-testing docs to reflect the new endurance/memory monitoring workflow and thresholds

Behavior

  • Endurance tests now record peak RSS during execution
  • Tests fail if memory growth or final RSS drift exceeds the configured budget
  • Summaries now include peak memory usage in MB

Docs updated

  • docs/LOAD_TESTING_GUIDE.md
  • docs/LOAD_TEST_QUICK_START.md
  • docs/LOAD_TEST_MONITORING.md

Verification

  • cargo fmt --all --check
  • Attempted cargo test -p propchain-tests endurance_test_short --release -- --nocapture
  • Full test compile is currently blocked by an unrelated existing syntax error in contracts/property-token/src/types.rs

closes #159

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 24, 2026

@shaaibu7 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@LaGodxy LaGodxy merged commit a0dd3a5 into MettaChain:main Apr 24, 2026
14 checks passed
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.

Load Testing: Memory leak detection

2 participants