Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to make Formatters.Console.output more compact? #246

zhongwencool opened this issue Aug 4, 2018 · 1 comment


Copy link

commented Aug 4, 2018

I think the Benchee.Formatters.Console.output/1's output waste of space.

##### With input 10k #####
Name                    ips        average  deviation         median         99th %
lists:reverse       17.84 K       56.04 μs    ±56.94%          38 μs         132 μs
tail_reverse        15.89 K       62.94 μs    ±23.63%       61.40 μs         102 μs

lists:reverse       17.84 K
tail_reverse        15.89 K - 1.12x slower

Memory usage statistics:

Name             Memory usage
lists:reverse       224.04 KB
tail_reverse        312.59 KB - 1.40x memory usage

**All measurements for memory usage were the same**

Is it possible to make it more compact ? such as:

##### With input 10k #####
Name               ips (comparison)     average    deviation    median    99th %  memory(comparison)
lists:reverse      17.84 K(fastest)      56.04 μs  ±56.94%      38 μs     132 μs  224.04 KB(smallest)
tail_reverse       15.89 K(17.84/1.12)   62.94 μs  ±23.63%      61.40 μs  102 μs  312.59 KB(224.04x1.40)
**All measurements for memory usage were the same**

PS: 13-inch screen's columns is 141.


This comment has been minimized.

Copy link

commented Aug 4, 2018


Thanks for your input!

of course it is! I just means we got to put in the work and it's not currently on a 1.0 release mule stone. :)

I mean to a degree and we got to see what we're talking about here.

For the unnecessary white space between the columns, definitely. That's something I want to do in the fashion of first having it all in a map like structure - determining the widest element in a column and then adjusting the length of all others accordingly.

As for mixing memory and the comparison together into the first table, I'm not a fan of that. If memory measurements are different we need to display way more values. Also, they are quite different beasts imo. We could also have no runtime measurements and only memory measurements etc.

As for comparison, now that I think about that we could just add a column with the comparison that might be nice. However, I'm a bit wary of the space we take up. I'm not sure if taking up all of 141 is the right call. E.g. I often split my monitor half/half and would still want it to work. The comparison is mainly the way it is because I got it from benchmark-ips.

However, if any of these totally annoy you writing a custom formatter that does it like this is also totally in the cards and encouraged. Just wait for the 0.14.0 release or master after #242 has dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.