SnmpKit.SnmpSim.Performance.ResourceManager (snmpkit v0.6.3)

System resource management for SNMP simulator. Enforces memory limits, device limits, and automatic cleanup. Optimizes resource utilization for high-scale scenarios.

Summary

Functions

Check if we can allocate a new device within resource limits.

Check if memory usage is within limits.

Returns a specification to start this module under a supervisor.

Force immediate cleanup of idle devices.

Get current resource usage statistics.

Register a new device allocation.

Unregister a device that has been stopped.

Update resource limits dynamically.

Functions

can_allocate_device?()

Check if we can allocate a new device within resource limits.

check_memory_limit()

Check if memory usage is within limits.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

force_cleanup()

Force immediate cleanup of idle devices.

get_resource_stats()

Get current resource usage statistics.

register_device(device_pid, device_type)

Register a new device allocation.

start_link(opts \\ [])

unregister_device(device_pid)

Unregister a device that has been stopped.

update_limits(opts)

Update resource limits dynamically.