Created
August 13, 2025 21:56
-
-
Save jmkim/5750a737639bdbc49b3e2aa0b3b0f82f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
private long getRandomBankCapacity() { | |
long[] capacities = { | |
32L * 1024 * 1024, // 32 MiB | |
64L * 1024 * 1024, // 64 MiB | |
128L * 1024 * 1024, // 128 MiB | |
256L * 1024 * 1024, // 256 MiB | |
512L * 1024 * 1024, // 512 MiB | |
1024L * 1024 * 1024, // 1 GiB | |
2L * 1024 * 1024 * 1024, // 2 GiB | |
4L * 1024 * 1024 * 1024, // 4 GiB | |
8L * 1024 * 1024 * 1024, // 8 GiB | |
16L * 1024 * 1024 * 1024, // 16 GiB | |
32L * 1024 * 1024 * 1024, // 32 GiB | |
64L * 1024 * 1024 * 1024, // 64 GiB | |
128L * 1024 * 1024 * 1024, // 128 GiB | |
256L * 1024 * 1024 * 1024 // 256 GiB | |
}; | |
return capacities[rnd.nextInt(capacities.length)]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment