Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mat-dev] Proposal: Add option to display bytes in KB, MB, GB, or Smart formats

Proposed patch to display bytes in KB, MB, GB, or Smart formats: https://bugs.eclipse.org/bugs/show_bug.cgi?id=437626 Diff: https://bugs.eclipse.org/bugs/attachment.cgi?id=244315&action="">

A few specific things I wanted to raise on the dev list:
* The Bytes class is added as a logical wrapper around a number of bytes. The Column class maps this to the BytesFormat formatter.
* The default option is BytesDisplay.Smart which changes the default MAT display behavior (which would be BytesDisplay.Bytes).
* The additional instances of the Bytes class might add some performance overhead.
* I tried to make the most surgical change possible, which means I did not audit all the code for all uses of bytes, but only particularly the structured results and reports that used a NumberFormat or DecimalFormat and switched those to ByteFormat (where applicable).
* All JUnit tests passed - is there anything else that needs to be done before committing (in addition to any feedback)?

--
Kevin Grigorenko
IBM WebSphere Foundation SWAT Team
kevin.grigorenko@xxxxxxxxxx
Blog: https://www.ibm.com/developerworks/mydeveloperworks/blogs/kevgrig/?lang=en


Back to the top