Logo de hotpath

hotpath

CommunautéPopulaire
pawurb

Rust profiler for CPU, memory, SQL, HTTP, and async performance, with Prometheus and Grafana support.

Éditeurpawurb
Dépôthotpath-rs
LangueRust
Forks
52
Étoiles
1.7K
Outils disponibles
0
Type de transportstreamable-http
Catégories
LicenceMIT
Liens
  • Connectez des outils à vos workflows IA

    hotpath propose des fonctionnalités MCP utilisables par les clients et agents IA compatibles.

  • 0 outils disponibles

    Parcourez les actions invocables ci-dessous, avec leurs noms et descriptions lorsque le serveur les fournit.

  • Configuration prête à copier

    Utilisez les exemples de configuration pour configurer ce serveur dans votre client MCP préféré.

  • Indicateurs de popularité open source

    1.7K étoiles et 52 forks sur le dépôt associé.

hotpath - Rust Performance, CPU & Memory Profiler

GH Actions Latest Version Downloads Sponsor

hotpath-rs is an easy-to-configure Rust performance profiler that shows exactly where your code spends time, burns CPU, and allocates memory.

It helps you distinguish between functions that are slow because they wait on I/O and those that are CPU-intensive. Instrument functions, channels, futures, streams, SQL queries, HTTP calls, and byte-level I/O to find bottlenecks and focus optimizations where they matter most. Get actionable insights into time, memory, and async data flow with minimal setup. Built-in support for Prometheus metrics and Grafana dashboards.

Try the TUI demo via SSH - no installation required:

ssh demo.hotpath.rs

Or let your own AI agent configure profiling in a repo:

cargo install hotpath
hotpath init --agent claude 

Explore the full documentation at hotpath.rs. See CONTRIBUTING.md for development setup and guidelines.

You can use it to produce one-off performance (timing, memory or CPU) reports:

hotpath alloc report

inspect throughput and latency of network, file or compression I/O streams:

hotpath-rs I/O profiling report showing per-stream read counts, bytes, transfer rate, average and P95 latency

analyze SQL/HTTP calls performance with automatic source function attribution:

hotpath-rs SQL query profiling report showing per-query call counts, source function attribution, average and P95 execution time

monitor throughput, performance and max queue depth of instrumented channels:

hotpath-rs channel profiling report showing throughput, send-to-receive latency and max queue depth per channel

or use the live TUI dashboard to monitor real-time performance and async data flow metrics with debug info:

https://github.com/user-attachments/assets/2e890417-2b43-4b1b-8657-a5ef3b458153

Features

  • Time, CPU & memory profiling - identify expensive functions, allocation hotspots, and investigate memory leaks.
  • Async observability - futures, channels and streams.
  • I/O monitoring - bytes, throughput, latency of any sync or async IO stream like files, TCP, or compression.
  • SQL query profiling - query performance metrics for sqlx and Diesel.
  • HTTP calls profiling - per-endpoint latency and error metrics for reqwest and ureq.
  • HTTP server profiling - per-route response time and error metrics for axum.
  • Concurrency metrics - Mutex/RwLock wait time and contention.
  • Tokio runtime monitoring - workers, scheduling and queues.
  • Prometheus & Grafana integration - export profiling metrics to your existing dashboards.
  • Live TUI dashboard & static reports - real-time or one-off analysis.
  • CI regression detection - benchmark every PR automatically.
  • MCP server for AI agents - query profiling data in real time.
  • Zero cost when disabled - fully feature-gated.

Getting Started

AI Setup (Recommended)

The quickest way to set up hotpath is to let an AI coding agent do it. Install the hotpath CLI and run init inside your project:

bash
cargo install hotpath --version '^0.26'
hotpath init --agent claude # or --agent codex / --agent opencode

hotpath init downloads the hotpath_init agent skill from GitHub and starts an interactive Claude Code, Codex or OpenCode session with it as setup instructions. The agent inspects your project, adds the feature-gated dependency, instruments main and a starting set of functions, channels and locks, then verifies that everything compiles with profiling enabled and disabled. You review and approve each edit through the agent's regular permission prompts. Requires curl and the claude, codex or opencode CLI on PATH.

You can also use the skill directly, without the hotpath CLI: copy it to ~/.claude/skills/hotpath_init/SKILL.md and run /hotpath_init in a Claude Code session.

Manual installation

Add to your Cargo.toml:

toml
[dependencies]
hotpath = "0.26"

[features]
hotpath = ["hotpath/hotpath"]
hotpath-cpu = ["hotpath/hotpath-cpu"]
hotpath-alloc = ["hotpath/hotpath-alloc"]
hotpath-prometheus = ["hotpath/hotpath-prometheus"]

This config ensures that the lib has no compile time or runtime overhead unless explicitly enabled via a hotpath feature. All the lib dependencies are optional (i.e. not compiled) and all macros are noop unless profiling is enabled.

Basic setup

You'll need only #[hotpath::main] and #[hotpath::measure] macros to get started:

rust
#[hotpath::measure]
fn sync_function(sleep: u64) {
    std::thread::sleep(Duration::from_nanos(sleep));
    let vec1 = vec![1, 2, 3];
    std::hint::black_box(&vec1); // force mem allocation
}

#[hotpath::measure]
async fn async_function(sleep: u64) {
    tokio::time::sleep(Duration::from_nanos(sleep)).await;
}

// When using with tokio, place the #[tokio::main] first
#[tokio::main]
#[hotpath::main]
async fn main() {
    for i in 0..10000 {
        sync_function(i);
        async_function(i * 2).await;

        hotpath::measure_block!("custom_block", {
            std::thread::sleep(Duration::from_nanos(i * 3))
        });
    }
}

Now, run your program with hotpath (and optionally hotpath-alloc features):

bash
cargo run --features='hotpath,hotpath-alloc'

On exit it will print a report with timings, memory allocations and thread usage metrics:

[hotpath] 1.20s | timing, alloc, threads

timing - Function execution time metrics.
+------------------------------+-------+----------+----------+----------+---------+
| Function                     | Calls | Avg      | P95      | Total    | % Total |
+------------------------------+-------+----------+----------+----------+---------+
| docs_example::main           | 1     | 1.20 s   | 1.20 s   | 1.20 s   | 100.00% |
+------------------------------+-------+----------+----------+----------+---------+
| docs_example::async_function | 1000  | 1.15 ms  | 1.20 ms  | 1.15 s   | 96.10%  |
+------------------------------+-------+----------+----------+----------+---------+
| custom_block                 | 1000  | 18.13 µs | 31.71 µs | 18.13 ms | 1.51%   |
+------------------------------+-------+----------+----------+----------+---------+
| docs_example::sync_function  | 1000  | 16.58 µs | 27.63 µs | 16.58 ms | 1.38%   |
+------------------------------+-------+----------+----------+----------+---------+

alloc - Cumulative allocations during each function call (including nested calls).
+------------------------------+-------+---------+---------+---------+---------+
| Function                     | Calls | Avg     | P95     | Total   | % Total |
+------------------------------+-------+---------+---------+---------+---------+
| docs_example::main           | 1     | 63.0 KB | 63.1 KB | 63.0 KB | 100.00% |
+------------------------------+-------+---------+---------+---------+---------+
| docs_example::sync_function  | 1000  | 12 B    | 12 B    | 11.7 KB | 18.58%  |
+------------------------------+-------+---------+---------+---------+---------+
| custom_block                 | 1000  | 0 B     | 0 B     | 0 B     | 0.00%   |
+------------------------------+-------+---------+---------+---------+---------+
| docs_example::async_function | 1000  | 0 B     | 0 B     | 0 B     | 0.00%   |
+------------------------------+-------+---------+---------+---------+---------+

threads - Thread CPU and memory statistics. (RSS: 7.8 MB, Alloc: 2.1 MB, Dealloc: 304.3 KB, Diff: 1.8 MB, 5/10)
+--------------+------+------+----------+----------+----------+
| Thread       | Max% | Avg% | Alloc    | Dealloc  | Diff     |
+--------------+------+------+----------+----------+----------+
| hp-functions | 1.8% | 1.2% | 1.8 MB   | 291.3 KB | 1.5 MB   |
+--------------+------+------+----------+----------+----------+
| main         | 6.3% | 5.1% | 367.8 KB | 9.9 KB   | 357.9 KB |
+--------------+------+------+----------+----------+----------+
| hp-threads   | 0.0% | 0.0% | 10.3 KB  | 3.0 KB   | 7.3 KB   |
+--------------+------+------+----------+----------+----------+
| hp-server    | 0.0% | 0.0% | 1.8 KB   | 56 B     | 1.7 KB   |
+--------------+------+------+----------+----------+----------+
| thread_5     | -    | -    | 640 B    | 24 B     | 616 B    |
+--------------+------+------+----------+----------+----------+

Full documentation

See the full docs and advanced config tutorials at hotpath.rs.

Read the complete guide to profiling Rust applications - a comprehensive overview of debugging performance issues in Rust.

Waitlist

My long-term goal for hotpath-rs is to become the single place to understand all performance signals in a Rust application. From CPU and memory usage to locks, channels, and async execution, all the way up to SQL queries and HTTP/RPC calls.

I'm also building a hosted version that makes profiling reports easier to share, compare, and analyze across pull requests, deployments, and teams.

If that sounds useful, join the waitlist for early access:

https://hotpath.rs/#waitlist

Status

This project is under active development. Core public APIs are stable, but implementation details (JSON report formats, TUI/MCP internals, and advanced config options) may change between releases as the project evolves.

Utilisez le serveur MCP hotpath avec plusieurs modèles IA

TypingMind connecte les outils MCP au niveau de l’espace de travail. Une fois hotpath connecté, vous pouvez donc l’utiliser avec différents modèles IA dans TypingMind sans avoir à le configurer séparément pour chaque modèle. Cette intégration MCP se connecte dans TypingMind via l’URL d’un serveur MCP hébergé à distance.

Ajoutez l’URL d’un serveur MCP

Choisissez cette méthode si hotpath est déjà hébergé à distance ou si votre équipe souhaite partager un même connecteur entre plusieurs utilisateurs.

1

Ouvrir les connecteurs MCP

Dans TypingMind, accédez à « Plugins », ouvrez « Connecteurs MCP », puis choisissez « Ajouter une URL ».

  1. Ouvrez TypingMind dans votre navigateur.
  2. Accédez à la section Plugins.
  3. Ouvrez les connecteurs MCP.
  4. Cliquez sur « Ajouter une URL ».
Formulaire TypingMind d’ajout de l’URL d’un serveur MCP personnalisé
2

Coller l’URL du serveur

Saisissez l’URL du serveur MCP fournie par le prestataire dans le champ « URL du serveur ». Ajoutez un nom de connexion, une description, une icône, des en-têtes HTTP personnalisés ou les paramètres du client OAuth si le serveur les exige.

  1. Collez l’URL du serveur MCP fournie par le prestataire dans le champ « URL du serveur ».
  2. Saisissez un nom de connexion pour hotpath.
  3. Ajoutez une description et une icône pour identifier plus facilement la connexion.
  4. Ajoutez des en-têtes HTTP personnalisés ou les informations du client OAuth si le serveur exige une authentification.
3

Créer la connexion

Cliquez sur « Créer la connexion », puis revenez à la liste des plugins et vérifiez que la nouvelle connexion MCP est active.

  1. Cliquez sur « Créer la connexion ».
  2. Revenez à la liste des connecteurs MCP.
  3. Vérifiez que la connexion hotpath apparaît comme active.
  4. Actualisez la liste des plugins si la connexion n’apparaît pas immédiatement.
4

Changer de modèle sans se reconnecter

Démarrez une discussion avec votre modèle préféré, activez les outils de hotpath depuis « Plugins » et passez à un autre modèle selon vos besoins. La connexion MCP reste disponible dans l’espace de travail TypingMind.

  1. Démarrez une nouvelle discussion dans TypingMind.
  2. Sélectionnez le modèle IA que vous souhaitez utiliser.
  3. Activez les outils de hotpath depuis la section Plugins.
  4. Demandez au modèle d’utiliser l’outil si nécessaire.
  5. Passez à un autre modèle IA et réutilisez la même connexion MCP.
Discussion TypingMind utilisant des outils MCP activés avec un modèle d’IA sélectionné
Pouvez-vous utiliser hotpath pour m’aider dans cette tâche ?
hotpath
Bien sûr. J’ai tout lu.
Voici ce que j’ai trouvé avec hotpath.

Foire aux questions

À quoi sert le serveur MCP hotpath ?

hotpath est un serveur MCP qui permet aux applications IA compatibles d’accéder à des outils et à des informations contextuelles externes. Dans TypingMind, il vous suffit d’ajouter ce serveur MCP une seule fois pour rendre ses outils disponibles dans votre espace de travail IA.

Puis-je utiliser le serveur MCP hotpath avec plusieurs modèles IA dans TypingMind ?

Oui. TypingMind connecte les outils MCP au niveau de l’espace de travail. Vous pouvez donc utiliser hotpath avec différents modèles IA comme Claude, ChatGPT, Gemini ou d’autres modèles configurés dans TypingMind, sans avoir à configurer le serveur MCP séparément pour chaque modèle.

Pourquoi utiliser le connecteur MCP hotpath avec TypingMind ?

TypingMind est l’une des meilleures interfaces de chat avec les LLM, car elle réunit plusieurs modèles IA, prompts, plugins, agents IA, clés API et outils MCP dans un seul espace de travail. Une fois hotpath connecté, vous pouvez utiliser ses outils MCP avec vos modèles préférés tout en gardant vos discussions bien organisées dans TypingMind.

Comment connecter le serveur MCP hotpath à TypingMind ?

Vous pouvez connecter hotpath à TypingMind en ajoutant l’URL de son serveur MCP hébergé. Cette option est utile si vous souhaitez une connexion MCP distante accessible depuis votre espace de travail TypingMind.

Quels outils le serveur MCP hotpath propose-t-il dans TypingMind ?

hotpath propose des fonctionnalités MCP que vous pouvez activer depuis la page Plugins de TypingMind et utiliser dans les discussions ou attribuer à des agents IA.

Dois-je partager mes clés API avec TypingMind pour utiliser le serveur MCP hotpath ?

Non. TypingMind privilégie le fonctionnement local et vous permet de garder le contrôle de vos fournisseurs de modèles, clés API, prompts et paramètres MCP. Si hotpath nécessite une authentification, ajoutez les en-têtes, les paramètres OAuth ou la configuration locale requis pour ce serveur MCP lors de la création de la connexion.

Serveurs MCP similaires

Tout voir

Créez votre propre espace IA dès maintenant

Abonnez-vous à notre newsletter pour être informé des nouvelles fonctionnalités et des prochains cadeaux à gagner 👇