cost 0.1.1

measure the cost of running your functions
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 3.12 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 471.81 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • znx3p0

Cost

Measure the cost of running a function.

This library exposes a function which takes a callback and returns the cost of running that function.

let (cost, num) = cost(|| fibonacci(20));
println!("it cost {} instructions to compute {}", cost, num);