This is an archive of the discontinued LLVM Phabricator instance.

[LNT] Use unit_abbrev of Fields in reports.
ClosedPublic

Authored by marxin on Sep 11 2018, 1:00 AM.

Details

Summary

The patch changes usage of Field

Example:: '120168106.0000' into
'114.60 MB'. I believe it's much more readable.

The revision depends on: https://reviews.llvm.org/D51405

Diff Detail

Repository
rL LLVM

Event Timeline

marxin created this revision.Sep 11 2018, 1:00 AM
MatzeB added inline comments.Sep 12 2018, 8:12 PM
lnt/server/ui/filters.py
68–69 ↗(On Diff #164819)

Wouldn't this produce "kilo seconds"? Should we guard this on something like field_unit == "bytes"?

marxin updated this revision to Diff 165738.Sep 17 2018, 4:12 AM
marxin marked an inline comment as done.

Updated to check for 'bytes' to be field.unit and field.unit_abbrev == 'B'.

lnt/server/ui/filters.py
68–69 ↗(On Diff #164819)

Fixed.

MatzeB accepted this revision.Sep 21 2018, 9:06 AM

LGTM
We may consider adding something like a tooltip in the future with the fully expanded value...

This revision is now accepted and ready to land.Sep 21 2018, 9:06 AM
This revision was automatically updated to reflect the committed changes.