Bodigrim / tasty-bench

Featherlight benchmark framework, drop-in replacement for criterion and gauge.
https://hackage.haskell.org/package/tasty-bench
MIT License
80 stars 11 forks source link

Print more digits? #53

Closed mitchellwrosen closed 7 months ago

mitchellwrosen commented 11 months ago

Hi, is it possible to print more digits in the output?

For example, I see a benchmark allocates approximately 1.9 G; is it possible to show e.g. 1.867 G instead?

Thanks!

Bodigrim commented 11 months ago

Are you looking to make it configurable or just one more digit would suffice? So 1.87 G instead of 1.9 G.

mitchellwrosen commented 11 months ago

Oh, I was wondering if it's configurable. I'm happy with the defaults, but I was curious to see more significant digits for a particular benchmark I'm working on.

Bodigrim commented 11 months ago

It's not configurable, unfortunately, but you can dump CSV with full precision. Writing your own test reporter is also a reasonable option, if you are proficient with tasty innards.

mitchellwrosen commented 11 months ago

Ok, sounds good. Would you accept a patch that makes the precision configurable? (I'm not sure I'd contribute the patch any time soon, just curious)

Bodigrim commented 11 months ago

Unlikely, --help output is already too long. I might be less reluctant to add one more digit unconditionally, because indeed "1.0 G" currently means anything between 950 M and 1049 M, which is too much of leeway.

Bodigrim commented 7 months ago

There seems to be no action points, thus closing. Feel free to reopen if there are further questions / suggestions / ideas.