2

I would like to benchmark functions created in my module, but I don't understand how I can import the module to then use the functions. My folders structure is the following

project
|-benches
  |-benchmarks.rs
|-src
  |-one
    |-mod.rs
  |-main.rs

And I would like to access the one module in the file benchmarks.rs. Can I do that? How? Thanks!

Kevin Reid
  • 37,492
  • 13
  • 80
  • 108
Astinog
  • 1,151
  • 3
  • 12
  • 35
  • Your crate ("project") is accessible as a crate to your benchmark test(s). Add `use project::one::whatever_it_is` and go from there. – Shepmaster Apr 02 '19 at 18:16

0 Answers0