I am looking for a profiling tool for rust-analyzer, and I wonder if not-perf could be of help. I have some very specific requirements, but I am not a profiling expert, so I don't know if what I ask is at all possible, hence this feature-request/support issue :) Feel free to just close with "out of scope" if I ask for something silly!
rust-analyzer relies heavily on incremental computation, and I'd love to profile the incremental case. The interesting benchmark looks like this:
load_data_from_disk(); // 200ms of IO
compute_completion(); // triggers initial analysis, 10 seconds
{
change_single_file();
compute_completion(); // re computation after a change, 300 ms
}
I am only interested in profiling the block. Although the running-time of the benchmark is dominated by initial analysis, I explicitly don't care much about its performance.
So, what I like is to do
sampling profiling (so that I don't have to instrument my code / bias times)
of fairly short-lived blocks of CPU-heavy code (hundreds of milliseconds)
from withing the application itself (so that I can start/stop profiling for specific section of code)
without depending on C code (just because building C is a pain)
Is this possible at least in theory (ie, are there sampling tools than can give such data)? Could not-perf be of help here? My dream API would look like this:
load_data_from_disk();
compute_completion();
{
let _p = not_perf::record("~/tmp/profile_data.perf")
.append(); // append to the data file, so that I can run this in a loop
change_single_file();
compute_completion();
// stops profiling on Drop
}
Hi!
I am looking for a profiling tool for rust-analyzer, and I wonder if
not-perf
could be of help. I have some very specific requirements, but I am not a profiling expert, so I don't know if what I ask is at all possible, hence this feature-request/support issue :) Feel free to just close with "out of scope" if I ask for something silly!rust-analyzer relies heavily on incremental computation, and I'd love to profile the incremental case. The interesting benchmark looks like this:
I am only interested in profiling the block. Although the running-time of the benchmark is dominated by initial analysis, I explicitly don't care much about its performance.
So, what I like is to do
Is this possible at least in theory (ie, are there sampling tools than can give such data)? Could not-perf be of help here? My dream API would look like this: