19 releases
Uses new Rust 2024
| new 0.1.9 | Feb 13, 2026 |
|---|---|
| 0.1.8 | Feb 13, 2026 |
| 0.1.2 | Jan 29, 2026 |
| 0.1.0-alpha.1 | Dec 21, 2025 |
#214 in Magic Beans
Used in 3 crates
47KB
895 lines
brk_bencher
Resource monitoring for long-running Bitcoin indexing operations.
What It Enables
Track disk usage, memory consumption (current + peak), and I/O throughput during indexing runs. Progress tracking hooks into brk_logger to record processing milestones automatically.
Key Features
- Multi-metric monitoring: Disk, memory (RSS + peak), I/O read/write
- Progress tracking: Integrates with logging to capture block heights as they're processed
- Run comparison: Outputs timestamped CSVs for comparing multiple runs
- macOS optimized: Uses libproc for accurate process metrics on macOS
- Non-blocking: Monitors in background thread with 5-second sample interval
Core API
let mut bencher = Bencher::from_cargo_env("brk_indexer", &data_path)?;
bencher.start()?;
// ... run indexing ...
bencher.stop()?;
Output Structure
benches/
└── brk_indexer/
└── 1703001234/
├── disk.csv # timestamp_ms, bytes
├── memory.csv # timestamp_ms, current, peak
├── io.csv # timestamp_ms, read, written
└── progress.csv # timestamp_ms, height
Built On
brk_errorfor error handlingbrk_loggerfor progress hook integration
Dependencies
~12–19MB
~242K SLoC