4 ms·
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 t
by Blackarea 2y ago
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?
- brancz 2y agoPrometheus 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)
- Blackarea 2y agoYeah 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.
- elevader 2y agoI'm not sure if this is what you are looking for but I found https://github.com/wolfpld/tracy 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 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.
- Blackarea 2y agolooks neat and added a bookmark, but it's a bit too much for my usecase right now. Thanks though :)
- yencabulator 2y agoWtf 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.