# Symbiotic
High-resolution performance profiling for Rust with hardware PMU counters, eBPF, and tracing integration.
## Features
- **1000Hz CPU Sampling**: Microsecond-level granularity for detailed performance analysis
- **Hardware PMU Integration**: Direct access to CPU performance counters
- **Cache Hierarchy Analysis**: L1D/L1I/L2/L3 cache hit/miss statistics
- **Memory Bandwidth Monitoring**: Track memory throughput and bottlenecks
- **SIMD Utilization**: Monitor AVX2/AVX512 instruction usage
- **Tracing Integration**: Correlate hardware events with application spans
- **Low Overhead**: < 5% performance impact even at aggressive sampling rates
- **Criterion Integration**: Seamless integration with Rust benchmarks
## Quick Start
```rust
use symbiotic::{Profiler, ProfilerConfig};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = ProfilerConfig::default();
let mut profiler = Profiler::new(config)?;
let report = profiler.profile_named("workload", || {
// Your code here
})?;
println!("{}", report);
Ok(())
}
```
## Criterion Integration
```rust
use criterion::{criterion_group, criterion_main, Criterion};
use symbiotic::criterion::DeepProfiler;
fn bench_function(c: &mut Criterion) {
c.bench_function("example", |b| {
b.iter(|| {
// Your benchmark code
});
})
.with_profiler(DeepProfiler::new());
}
criterion_group!(benches, bench_function);
criterion_main!(benches);
```
## Requirements
- Linux kernel >= 5.8 (for eBPF support)
- `perf_event_paranoid` <= 1 for PMU access
- Optional: CAP_PERFMON capability for non-root profiling
## License
This project is dual-licensed under MIT OR Apache-2.0.