Benchmark functions with Criterion

Hello everyone!

This might be a simple question but I couldn't find any help online.

I want to benchmark some functions. The crate I want to use is criterion.
The benchmark is in myProject/bench/ the functions I want to benchmark are in myProject/src/utils/ .
How do I import the functions into the benchmark?

I would be really happy if someone could answer my question!

The functions have to be exported from your library crate. If your package (project) does not already have a library crate, you will need to add one — src/ — and move modules from your src/ to it.

This solution works. Thanks for the help!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.