michaelherold / benchmark-memory

Memory profiling benchmark style, for Ruby 2.1+

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clean up output

michaelherold opened this issue · comments

Currently, the output looks a little wonky because we're showing object counts and string counts as floating point numbers so they are always displayed with three zeros after the decimal point. I originally thought it would be nice to keep the same output as benchmark-ips so I went with it.

After further reflection, I think we should come up with our own display. I like the collapse of large memory values into larger units so I think that should stay ... but we should truncate any .000 measurements when the allocations are small enough to be reported in bytes.

The trick here will be making the display of mixed units look nice. I'd also ideally like to keep the report at or around 49 characters, but I'm willing to relax that to 79 characters if need be.