firefox-devtools / firefox-devtools/profiler
Improve "Buffer Capacity" display, e.g. "8.00MB" -> "8 MiB"
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 491
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 30
Description
E.g., for a `profile.meta.configuration.capacity" of 8388608 (which is 8 * 1024 * 1024), the displayed "Profile Information" -> "Buffer Capacity" is "8.00MB".
In my opinion:
* The '.00' should be removed.
* The unit should be "MiB", to clarify that they are IEC "Mebibytes" (2^20 or 1024^2) and not strict SI "Megabytes" (10^6 or 1000^2). See https://en.wikipedia.org/wiki/Mebibyte
* I think a space would help with reading.
So the capacity in this case should be displayed as "8 MiB".
Note that starting with https://bugzilla.mozilla.org/show_bug.cgi?id=1634234 , the profiler will only use exact powers of 2 as "Buffer Capacity", so in most new profiles we should get nice "round" numbers of MiBs. (However we may remove the power-of-2 restriction one day, but I hope we'll keep round numbers of MiBs nonetheless.)
┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-259)
Contributor guide
Assessment
This issue has not been assessed yet.