Statistical collection and analysis framework used throughout the I2P router for adaptive operation, performance monitoring, and debugging.
This package provides a comprehensive statistics system that enables the router to:
- Monitor Performance: Track bandwidth usage, message rates, and processing times
- Adaptive Behavior: Dynamically adjust routing and tunnel management based on observed patterns
- Debugging Support: Provide detailed metrics for troubleshooting and analysis
- Health Monitoring: Track router and network health indicators
- Rate Limiting: Implement adaptive rate controls based on current load
Key Components:
- RateStat: Core rate statistics collection and averaging
- Rate: Individual rate measurements with configurable averaging periods
- Frequency: Event frequency tracking and analysis
- StatManager: Central coordinator for all statistics operations
The statistics system is designed to be lightweight and efficient, providing valuable
insights into router operation without significantly impacting performance. Statistics
are used both internally for adaptive routing decisions and externally for monitoring
and debugging purposes.