feat: optimize system monitor with async I/O and traffic since reboot

- Replace synchronous file operations with async aiofiles
- Implement concurrent data gathering using asyncio.gather()
- Move API calls to thread pool executor
- Add LRU cache for config file reads
- Optimize parsing functions for single-pass processing
- Reduce measurement intervals for faster response times
- Add system uptime and boot time display
- Track total network traffic since last reboot from /proc/net/dev
- Separate system traffic (since reboot) from user traffic (all-time)
- Add human-readable uptime formatting
- Enhance output with clear traffic categorization
This commit is contained in:
Whispering Wind
2025-08-19 23:36:44 +03:30
committed by GitHub
parent cdab63a72a
commit 6fa872b6c3
2 changed files with 206 additions and 69 deletions

View File

@ -22,6 +22,7 @@ urllib3==2.5.0
yarl==1.20.1
hysteria2-api==0.1.3
schedule==1.2.2
aiofiles==24.1.0
# webpanel
annotated-types==0.7.0