-
Notifications
You must be signed in to change notification settings - Fork 2k
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
UI: Refactor all displayed units to use common utils (featuring bigger suffixes) #10257
Conversation
Ember Asset Size actionAs of 20c3b98 Files that got Bigger 🚨:
Files that stayed the same size 🤷:
|
Ember Test Audit comparison
|
Ember Test Audit flaky testsEmber Test Audit detected these flaky tests on a02adc6ecb177aac922f113c6224a3fce3e4aa23:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it!! I appreciate this all being centralised and rationalised. There’s the flaky test and the logging statements but apart from that this looks great. Your style guide-esque proposal makes sense to me.
a02adc6
to
b904a5b
Compare
b904a5b
to
a5a1d20
Compare
Consolidates all the bytes and hertz units logic in one place.
a5a1d20
to
20c3b98
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
total success 🥳
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Originally I just wanted to make things go THz, PHz, TiB, and PiB. But upon doing so it seemed practical to also make all formatting go through the same code paths. This was a bigger undertaking than anticipated 😄
First, the new stuff before the stuffy details:
A large and quite empty cluster showing aggregate capacity figures reduced to terabytes of memory and terahertz of cpu shares.
Okay, now the stuffy details.
A new
utils/units.js
file contains all the units logic including:Then there are four helpers that use this file to expose the utils to templates.
I think the first two options listed above make immediate sense: gotta format stuff, gotta have structured output for fancy HTML.
The third option is a style guide proposal of sorts. I think sometimes it makes sense to see numbers in the human format (i.e., reduced as much as possible) and other times it makes sense to see numbers in the scheduler format (i.e., in MiB and MHz regardless of size since that's what job files and such use).
The rule of thumb is to always use the human format unless the number represents one task, allocation, or client, and the number is not realtime utilization.