Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this crate support profiling with criterion? #20

Open
dclong opened this issue Aug 13, 2022 · 3 comments
Open

Does this crate support profiling with criterion? #20

dclong opened this issue Aug 13, 2022 · 3 comments

Comments

@dclong
Copy link

dclong commented Aug 13, 2022

Criterion supports profiling as well. Can this crate be used for profiling with criterion?

@jbreitbart
Copy link
Owner

I am not sure what you mean with profiling. This crate allows you to use perf counters as input for criterion.rs and criterion uses them the same way as it uses its default inputs.

@dclong
Copy link
Author

dclong commented Aug 15, 2022

Criterion is mainly for benchmark (measuring how fast a block of code runs). However, it support profiling a block of code too, which measures how much relative time each part of the code block takes. This is often very helpful for identify the bottleneck of a code block. There is a Rust crate pprof for profiling which supports integration with Criterion.

criterion-perf-events is great plugin for Criterion and I have been using criterion + criterion-perf-events to generate stable benchmark results. However, I'd like to know whether it's possible to leverage criterion-perf-events (or the underlying crate perfcnt) for profiling as well.

@iamkroot
Copy link

iamkroot commented Jan 19, 2023

I guess the feature request is to support Criterion::Profiler trait, something like PProfProfiler.

In my case, I would like to use perf to generate a flamegraph, similar to how the pprof crate is doing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants