Use human readable durations
Benchmark reports that show, eg. 472666693ns/iter, are very difficult to scan.
This change formats benchmarks measured in ns/iter with a more human readable duration.
Example output: https://github.com/414owen/outlines-core/pull/7
@ktrz
Thank you for your contribution @414owen!
Could you please have a look at the failing tests and lint checks and fix those issues?
@ktrz this should be ready for another pair of eyes
Hey @414owen
Thank you for fixing the lint issues and adding tests!
I've noticed that this only works for ns/iter. It would be great to handle other units as well, like us, ms, etc. Both in different formats as well like <time unit>, <time unit>/iter, and ops/<time unit>.
Would you mind adding handling for those cases as well and also add some test cases specifically for the things you are trying to improve?