You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use pprof with criterion to generate a flamegraph and I'm not sure what I'm missing as it seems to match the example functionally but no SVG is generated. Below is the entire benchmark source but it can also be found here https://github.com/xd009642/yin/blob/pprof_test/benches/yin_benchmark.rs
Also not sure if there's some way to turn on some form of logging for pprof but it could be useful for something just to help diagnose if things like that are a user problem or a pprof problem. I didn't see any mentioned and tried a quick RUST_LOG change which didn' do anything but if anyone has any tips in that regard I'd be interested 👀
I was able to address this by passing in a --profile-time. This will run the profile (and not do the normal Criterion analysis). Note that if you're using cargo bench then you'll need to invoke the command something like $ cargo bench --bench benchmark -- --profile-time 60. Refer to the Criterion FAQ for more details.
These functions will be called before and after each benchmark when running in --profile-time mode, and will not be called otherwise. This makes it easy to integrate in-process profiling into benchmarks when wanted, without having the profiling instrumentation affect regular benchmark measurements.
To my understanding, criterion is using this option as a switch for the external profiler.
I tried to use pprof with criterion to generate a flamegraph and I'm not sure what I'm missing as it seems to match the example functionally but no SVG is generated. Below is the entire benchmark source but it can also be found here https://github.com/xd009642/yin/blob/pprof_test/benches/yin_benchmark.rs
Also not sure if there's some way to turn on some form of logging for pprof but it could be useful for something just to help diagnose if things like that are a user problem or a pprof problem. I didn't see any mentioned and tried a quick
RUST_LOG
change which didn' do anything but if anyone has any tips in that regard I'd be interested 👀The text was updated successfully, but these errors were encountered: