DEV.co
MCP Servers · pawurb

hotpath-rs

hotpath-rs is a Rust performance profiler that measures CPU, memory, and time spent in functions, async code, channels, and SQL queries. It provides both live TUI dashboards and static reports, with minimal overhead when disabled via feature flags.

Source: GitHub — github.com/pawurb/hotpath-rs
1.6k
GitHub stars
48
Forks
Rust
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorypawurb/hotpath-rs
Ownerpawurb
Primary languageRust
LicenseMIT — OSI-approved
Stars1.6k
Forks48
Open issues5
Latest releasev0.21.1 (2026-07-06)
Last updated2026-07-07
Sourcehttps://github.com/pawurb/hotpath-rs

What hotpath-rs is

Instrumentation-based profiler using macros (#[hotpath::measure], hotpath::channel!, hotpath::mutex!) to track execution time, allocations, and async data flow. Supports feature-gated zero-cost abstraction, Tokio runtime introspection, and MCP server for AI agent integration.

Quickstart

Get the hotpath-rs source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/pawurb/hotpath-rs.gitcd hotpath-rs# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Identifying allocation hotspots and memory leaks

Tracks cumulative allocations per function with P95 histograms; ideal for memory-constrained services or when baseline RSS must stay stable across releases.

Async bottleneck analysis in Tokio applications

Monitors channels (throughput, latency, queue depth), futures, streams, and Tokio worker scheduling; pinpoints whether slowness is I/O wait or CPU-bound computation.

SQL performance regression detection in CI/CD

Profiles sqlx and Diesel queries with per-query call counts and P95 latency; can fail PRs if benchmarks degrade, enforcing performance budgets.

Implementation considerations

  • Requires adding hotpath dependency and feature flags (hotpath, hotpath-cpu, hotpath-alloc) to Cargo.toml; feature-gating ensures zero runtime cost when profiling is disabled.
  • Macro instrumentation is manual—must explicitly annotate functions, blocks, channels, and locks; no automatic discovery means large codebases need a rollout plan.
  • TUI dashboard and MCP server introduce additional dependencies (tokio-based, requires network port); static report mode is simpler but one-off.
  • Tokio-specific features (runtime monitoring, task scheduling) assume Tokio runtime; other async runtimes (async-std, smol) not documented as supported.
  • CPU profiling via hotpath-cpu feature uses platform-specific sampling; overhead and accuracy vary by OS (Linux, macOS, Windows support unclear from README).

When to avoid it — and what to weigh

  • Need production telemetry at scale — hotpath is designed for development and CI profiling, not continuous instrumentation across distributed systems. Not positioned as APM/observability platform.
  • Require zero code changes — Mandatory macro annotations (#[hotpath::measure], hotpath::channel!) mean non-invasive sampling-only profilers (perf, flamegraph) may be preferable for quick diagnosis.
  • Need multi-language support — Rust-only; profiling is tightly integrated via macros and cannot profile FFI calls or external binaries without separate tooling.
  • License compliance uncertainty in closed-source projects — While MIT is permissive, project age (created Sept 2025, latest July 2026) and v0.21 maturity mean legal/compliance review is recommended for proprietary use.

License & commercial use

MIT License (OSI-approved, permissive). Allows commercial use, modification, and distribution with minimal restrictions (attribution appreciated but not legally required).

MIT is a permissive OSI license suitable for commercial closed-source use. However, project age (Sept 2025–July 2026 window) and pre-1.0 version (v0.21) indicate early maturity. Conduct your own review of API stability, security posture, and maintenance commitment before relying on it in production systems.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityLow
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

No security audit or CVE data provided. MCP server exposes profiling data over network—authenticate and isolate access if used in sensitive environments. Instrumentation macros add code paths; audit generated code if deployed to high-security contexts. Allocation tracking and lock contention metrics may reveal internal timing/memory patterns.

Alternatives to consider

flamegraph (perf/libunwind)

Sampling-based CPU profiler; no code changes required, lower overhead but less precise for short functions. Works across languages via OS-level sampling.

pprof (Rust crate by Google)

In-process CPU/memory profiling with statistical sampling; less invasive than hotpath but coarser granularity for async code and channels.

Grafana Pyroscope / Jaeger (distributed tracing)

APM-grade observability for production; supports distributed traces, persistent storage, and team dashboards. Overkill for local dev profiling but standard for microservices.

Software development agency

Build on hotpath-rs with DEV.co software developers

Evaluate hotpath-rs with your Rust codebase in dev. Add macros to critical functions and channels, run with feature flags enabled, and review the profiling reports. Assess suitability for your async patterns and release workflow before adoption.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

hotpath-rs FAQ

Does hotpath have zero overhead when disabled?
Yes. All instrumentation is feature-gated (behind hotpath, hotpath-cpu, hotpath-alloc feature flags). When disabled, macros expand to no-ops and dependencies are not compiled.
Can I use hotpath in production?
Not recommended as a continuous profiler. Designed for development and CI regression detection. If production profiling is needed, use sampling modes or static reports only, not the live TUI dashboard.
Does hotpath work with async-std or other runtimes?
Unknown. README focuses on Tokio integration (workers, scheduling, queues). Other runtimes not mentioned; custom async data flow macros may work but not documented.
What is the maturity level of hotpath?
Pre-1.0 (v0.21.1). Active development and roadmap items in progress. Suitable for development workflows; API or breaking changes possible before 1.0 release.

Software development & web development with DEV.co

Adopting hotpath-rs is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate mcp servers software in production.

Ready to find your Rust performance bottlenecks?

Evaluate hotpath-rs with your Rust codebase in dev. Add macros to critical functions and channels, run with feature flags enabled, and review the profiling reports. Assess suitability for your async patterns and release workflow before adoption.