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

HTML report documentation #638

Closed
AntoniosBarotsis opened this issue Dec 13, 2022 · 4 comments · Fixed by #662
Closed

HTML report documentation #638

AntoniosBarotsis opened this issue Dec 13, 2022 · 4 comments · Fixed by #662

Comments

@AntoniosBarotsis
Copy link

I was trying to benchmark some of my code and could not get the HTML report generated. I wasn't sure why up until I checked a previous project I worked on which specified the html_reports feature.

I feel like mentioning this in here would probably help any newcomers to the project. I could make a small PR for this, just let me know what you think of this!

I would add something like

"Criterion.rs can generate an HTML report displaying the results of the benchmark under
target/criterion/reports/index.html. Note that for this to happen you need to include the html_reports like so criterion = { version = "0.4.0", features = [ "html_reports" ]}.`"

@conradoplg
Copy link

conradoplg commented Dec 13, 2022

I just got bit by this but figured that the solution was to explicitly pass --plotting-backend gnuplot (which annoyingly requires you to specify the benchmark to run, otherwise it tries to pass that flag to the library benchark which won't use criterion and it will fail; e.g. cargo bench --bench bench -- --plotting-backend gnuplot)

Investigating the source code I found out that html_reports just enables the HTML report generation by default, and not the ability to generate HTML reports which was what I assumed. So this is why both solutions work.

In short, yeah, the documentation could be clearer.

@AntoniosBarotsis
Copy link
Author

@bheisler I'll just leave this up to you :)

@BartTerpstra
Copy link

got stuck on this as well.
this was the answer.
thank you 👍

@bazhenov
Copy link

bazhenov commented Mar 1, 2023

Same situation. It would be nice to have this sort of information in the manual.

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

Successfully merging a pull request may close this issue.

4 participants