Search documentation of snmpkit

# SnmpKit.SnmpSim.Performance.OptimizedDevicePool (snmpkit v1.2.0)

High-performance device pool with ETS-based caching and optimization. Designed for 10K+ concurrent devices with sub-millisecond lookup times.

Features:

- ETS-based device registry for O(1) lookups
- Profile caching to avoid repeated profile loading
- Connection pooling for efficient resource reuse
- Hot/warm/cold device tiers for optimal memory usage
- Pre-computed response caching for common OIDs

# Summary

## Functions

cache_response(port, oid, response, ttl_ms \\ 300_000)

Cache response for future requests.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

cleanup_cold_devices()

Force cleanup of cold tier devices.

configure_port_assignments(assignments)

Configure port assignments for device types.

get_cached_response(port, oid)

Get cached response for common OID requests. Returns {:cache_hit, response} or :cache_miss.

get_device(port)

Get device PID with optimized lookup (O(1) from ETS). Creates device lazily if it doesn't exist.

get_device_profile(device_type)

Get device profile from cache or load it.

get_performance_stats()

Get performance statistics for monitoring.

promote_to_hot_tier(port)

Promote device to hot tier for frequent access optimization.

start_link(opts \\ [])

# Functions

# cache_response(port, oid, response, ttl_ms \\ 300_000)

Cache response for future requests.

# child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# cleanup_cold_devices()

Force cleanup of cold tier devices.

# configure_port_assignments(assignments)

Configure port assignments for device types.

# get_cached_response(port, oid)

Get cached response for common OID requests. Returns {:cache_hit, response} or :cache_miss.

# get_device(port)

Get device PID with optimized lookup (O(1) from ETS). Creates device lazily if it doesn't exist.

# get_device_profile(device_type)

Get device profile from cache or load it.

# get_performance_stats()

Get performance statistics for monitoring.

# promote_to_hot_tier(port)

Promote device to hot tier for frequent access optimization.

# start_link(opts \\ [])