How daangn/autopprof works
Main Components
a. Core Components:
• Profiler Manager (autopprof.go)
• Resource Queryer System (queryer/)
• Profile Handler (profile.go)
• Reporting System (report/)
b. External Interfaces:
• Target Go Application
• Container Runtime (cgroup v1/v2)
• Reporting Destinations (e.g., Slack)
Specific Implementation Details
• Rectangles: Core components
• Hexagons: External systems
[Target Go Application]
• ↓
[Autopprof Manager]
• ↙ ↓ ↘
[Queryer] [Profiler] [Reporter]
• ↓ ↓ ↓
[cgroup] [Profiles] [Slack]
Component Details
a. Queryer System:
• CPU Usage Monitor (cgroupv1.go/cgroupv2.go)
• Memory Usage Monitor
• Runtime Stats Collector
• Queue Manager
b. Profile Handler:
• CPU Profiler
• Memory Profiler
• Threshold Controller
c. Reporter:
• Slack Integration
• Report Formatter
• Async Delivery System
Important Notes
• Monitoring components (blue)
• Profiling components (green)
• Reporting components (orange)
• External systems (gray)
• Labels for:
• Threshold values (CPU: 0.75, Memory: 0.75)
• Monitoring intervals
• Supported platforms (Linux-only)