Skip to content

Conversation

414owen
Copy link
Contributor

@414owen 414owen commented Feb 11, 2025

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: 414owen/outlines-core#7

@ktrz

@414owen 414owen force-pushed the os/pretty-durations branch from 627f3b2 to 6992a91 Compare February 11, 2025 16:03
@414owen 414owen marked this pull request as draft February 11, 2025 16:19
@414owen 414owen force-pushed the os/pretty-durations branch 3 times, most recently from c049ca9 to 8d0f52a Compare February 11, 2025 18:18
@ktrz
Copy link
Member

ktrz commented Mar 12, 2025

Thank you for your contribution @414owen!

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

@414owen 414owen force-pushed the os/pretty-durations branch 4 times, most recently from 9592783 to bfec205 Compare May 16, 2025 21:59
@414owen 414owen force-pushed the os/pretty-durations branch from bfec205 to e069778 Compare May 17, 2025 00:01
@414owen
Copy link
Contributor Author

414owen commented May 17, 2025

@ktrz this should be ready for another pair of eyes

@414owen 414owen marked this pull request as ready for review August 20, 2025 16:41
@ktrz
Copy link
Member

ktrz commented Sep 2, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants