forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add helper functions for ByteSizeValues of a given unit (elastic#63679)
As a developer that periodically worries about absolute sizes of bytes, I love our good ByteSizeValue abstractions + and the unit sizes. But, I find the pattern `new ByteSizeValue(<some long>, <some unit>).getBytes()` frustrating. This commit adds some simple convenience methods for each byte unit and constructing a ByteSizeValue of the given size for that unit.
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters