Re:Rust: Doubling Throughput with Continuous Profiling and O...
by Blackarea on Friday February 14, 2025 @04:55AM
(#43046738)
I am in the midst of writing a little toy axum project for my pi and also want to measure cpu/mem performance for that. In jvm land I used Prometheus for such tasks. Is there a straight forward tool/crate that anyone can recommend for this?
[ Parent
| on HN ]
Re:Rust: Doubling Throughput with Continuous Profiling and O...
by brancz on Friday February 14, 2025 @05:59AM
(#43047145)
Prometheus gives you CPU/memory total metrics, the profiler used in the article gets you much higher resolution: down to the line number of your source code.
If you're looking to optimize your project I would recommend using a profiler rather than metrics that just tell you the total.
(disclaimer: I'm the founder of the company that offers the product shown in the blog post, but I also happen to be a Prometheus maintainer)
Re:Rust: Doubling Throughput with Continuous Profiling and O...
by Blackarea on Friday February 14, 2025 @10:23AM
(#43049242)
Yeah my comment wasn't that well thought through. Obviously if I want to find bottle necks in my code profiling is what I want. If I want to monitor actual load and peaks in prod I wanna go for some kind of monitoring. I have good experiences with Prometheus, but I went with sysinfo crate. Which is probably lightyears more basic/big picture. I love that I can just record my own metrics log them to csv and summarize peaks for live view exposed through axum in html. It's neat for my toy project which doesn't aim for industry standard.
Re:Rust: Doubling Throughput with Continuous Profiling and O...
by elevader on Friday February 14, 2025 @06:52AM
(#43047438)
I'm not sure if this is what you are looking for but I found https://github.com/wolfpld/tracy to work rather well. There is an integration for the tracing crate that can get you very far: https://lib.rs/crates/tracing-tracy. If you're just looking for a very high level report then this might be a bit too much detail.
Re:Rust: Doubling Throughput with Continuous Profiling and O...
by Blackarea on Friday February 14, 2025 @10:29AM
(#43049316)
looks neat and added a bookmark, but it's a bit too much for my usecase right now. Thanks though :)
Re:Rust: Doubling Throughput with Continuous Profiling and O...
by yencabulator on Friday February 14, 2025 @12:57PM
(#43051082)
Wtf is this:
> Depending on the configuration Tracy may broadcast discovery packets to the local network and expose the data it collects in the background to that same network. Traces collected by Tracy may include source and assembly code as well.