hud-tokio-profiler
Installation
SKILL.md
hud — Tokio Worker Profiler (eBPF)
Overview
hud (github.com/cong-or/hud) is a zero-instrumentation, eBPF-based profiler that finds code blocking Tokio async runtime workers. It attaches to a running process and watches the Linux scheduler: when a worker thread spends too long off-CPU in TASK_RUNNING (preempted, not sleeping), it captures a stack trace. No code changes, no rebuild for attach, no recompile of the profiler into your app.
Core principle: it measures the symptom (scheduling latency on worker threads), then you read the captured stacks to find the cause (sync I/O, locks, compute on the runtime).
Written in Rust. Dual-licensed MIT / Apache-2.0.
When to Use
Use hud when:
- A Tokio service has tail-latency spikes, periodic stalls, or "tasks queue up then burst."
- You suspect blocking-in-async:
std::fs,std::sync::Mutex, crypto, compression, bigserde_jsonparses, per-request file reads. - You need to profile a running prod/staging process and cannot rebuild it to attach.
- You want fast triage before reaching for heavier instrumentation.