cd profiler
# Quick start
./profiler.sh help
# Run all profilers
./profiler.sh all codex
# Individual profilers
./profiler.sh quick codex # Quick metrics
./profiler.sh network codex # Network analysis
./profiler.sh disk codex # Disk I/O
./profiler.sh audit codex # Full system audit
./profiler.sh complexity . rust # Code complexity
| Command |
Output |
quick |
RSS, CPU, Threads, FDs, Network |
full |
All system metrics |
network |
Connections, bandwidth |
disk |
I/O rates, file usage |
audit |
Complete system audit |
complexity |
Space/time analysis |
continuous |
Live CSV + charts |
all |
Run everything |
- all_metrics.sh - Core metrics (memory, CPU, FDs)
- full_system_audit.sh - Complete audit
- continuous_profiler.py - Live monitoring
- network_profiler.sh - Network I/O
- disk_profiler.sh - Disk I/O
- complexity_analyzer.py - Code complexity
- generate_charts.py - Visual charts from CSV
# Quick profile
./profiler.sh quick codex
# Full audit
./profiler.sh audit codex reports/
# Network only
./profiler.sh network thegent
# Disk I/O
./profiler.sh disk codex
# Code complexity (Rust)
./profiler.sh complexity . rust
# Code complexity (Python)
./profiler.sh complexity . python
# Continuous monitoring
python3 bin/continuous_profiler.py codex
reports/
├── all_metrics_YYYYMMDD_HHMMSS.txt
├── network_YYYYMMDD_HHMMSS.txt
├── disk_YYYYMMDD_HHMMSS.txt
├── full_audit_YYYYMMDD_HHMMSS.txt
└── codex_metrics_YYYYMMDD_HHMMSS.csv (continuous)
- RSS, VMS, VmPeak, VmData, VmStk, VmExe, VmLib
- Memory maps, shared/private
- CPU %, threads, context switches
- Per-thread CPU time
- FD count, types (pipe, socket, anon)
- Open files, CWD, root
- TCP/UDP connections
- Bandwidth (rx/tx)
- Read/write bytes
- I/O rates
- Cyclomatic complexity
- Recursion detection
- Loop/conditional counts
| Metric |
Value |
| RSS |
~150MB idle |
| CPU |
0.1% idle |
| FDs |
25 |
| Growth |
50MB/hr |
| Metric |
Value |
| RSS |
<20MB |
| CPU |
0% idle |
| FDs |
<10 |
| Growth |
0 |