github-action-benchmark icon indicating copy to clipboard operation
github-action-benchmark copied to clipboard

Use human readable durations

Open 414owen opened this issue 10 months ago • 3 comments

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

414owen avatar Feb 11 '25 11:02 414owen

Thank you for your contribution @414owen!

Could you please have a look at the failing tests and lint checks and fix those issues?

ktrz avatar Mar 12 '25 07:03 ktrz

@ktrz this should be ready for another pair of eyes

414owen avatar May 17 '25 00:05 414owen

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?

ktrz avatar Sep 02 '25 21:09 ktrz