evoq_memory_monitor (evoq v1.5.0)
View SourceMemory pressure monitor for adaptive TTL.
Monitors system memory usage and adjusts aggregate TTLs to prevent unbounded memory growth.
Pressure Levels:
- normal - Memory below 70 percent, TTL factor 1.0x
- elevated - Memory 70-85 percent, TTL factor 0.5x
- critical - Memory above 85 percent, TTL factor 0.1x
Summary
Functions
Get the current memory pressure level.
Get memory monitor statistics.
Get the current TTL factor (0.0 - 1.0).
Start the memory monitor with default config.
Start the memory monitor with custom config. Options: - check_interval: Milliseconds between checks (default: 10000) - elevated_threshold: Memory % for elevated level (default: 0.70) - critical_threshold: Memory % for critical level (default: 0.85)
Types
Functions
-spec get_pressure_level() -> pressure_level().
Get the current memory pressure level.
-spec get_stats() -> map().
Get memory monitor statistics.
-spec get_ttl_factor() -> float().
Get the current TTL factor (0.0 - 1.0).
Start the memory monitor with default config.
Start the memory monitor with custom config. Options: - check_interval: Milliseconds between checks (default: 10000) - elevated_threshold: Memory % for elevated level (default: 0.70) - critical_threshold: Memory % for critical level (default: 0.85)