-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Bytes field format uses binary units while showing decimal unit labels #7543
Comments
Agreed, however this isn't a quick fix since it's an issue in the upstream library we use for number formatting: adamwdraper/Numeral-js#312 |
Hi All, For your parameter e.g. number of bytes of memory used called ‘avgRSS’ one can create a scripted field in Kibana with the following formula: name of the scripted field: avgRSS_main_reco This corrects for the wrong binary conversion factor finally using decimal one in line with the decimal unit labels. It carries with it the inconvenience, that one has to be alert in case Kibana fixes the issue in the future. but as far as I have heard, this is not going to happen anytime soon (problem located in one of the upstream libraries). Cheers, PS: for general n-core jobs e.g.: (doc[‘avgRSS'].value/doc['ncores'].value) * pow(1.024, ln(doc['avgRSS'].value/doc['ncores'].value)/ln(1000)) |
This has been fixed in upstream library. "Breaking change / Feature: Bytes are now formatted as: b (base 1000) and ib (base 1024)" So this needs to be upgraded in Kibana. I tried myself to upgrade and it's working as expected.
|
Would anyone know the Kibana version number from which this fix has been included ? |
@spalger Did we pull in this fix to our fork of numeral.js ? |
@jimgoodwin nope, this is not fixed in our fork. I spent a little time upgrading to the latest version of numeral so we could get support for differentiating between |
Hey, I think that 6.X is a good chance for the upgrade of the numeral.js library. (We're looking for the b/ib change as well). Any chance to get this implemented? |
Hi is this currently fixed in Kibana 6.2.X ??? |
I think the second option (use binary units as now while fixing the labels to KiB, MiB, GiB, TiB, PiB etc.) is the smallest change, and doesn't sound like a breaking change to me. |
I'm working on a fix to this in our numeral fork: #7543 As described there, this changes the If we decide to merge that change and upgrade our version of |
After some more discussion and investigation, it seems like there are many entities that use the decimal units labels for binary bytes, so 1024 bytes = 1 KB (not We should support all the inconsistencies in the real world, which means that I think we need to support three options and clarify this to our users:
|
Pinging @elastic/kibana-app-arch (Team:AppArch) |
Closing this issue because it's now supported to use different Kibana numeral formatting patterns for all options discussed. |
Kibana 4.5 is given file sizes in bytes, and the functionality should conveniently translate this number of many digits into the common KB, MB, GB nomenclature using decimal units. The problem is, Kibana uses binary units while showing decimal unit labels KB, MB, GB, TB, PB. This results in misleading and confusing information (see this graphic)
There are two options how to fix this issue (both could be implemented):
Currently 719373000 bytes gets translated into "685.7MB" instead of "685.7MiB" or "719.4MB".
The text was updated successfully, but these errors were encountered: