Last active
August 29, 2015 14:17
-
-
Save mdarby/0f304779a14b3f5acba6 to your computer and use it in GitHub Desktop.
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
jobs | |
|> Enum.map(fn(x) -> x.name end) | |
|> Enum.sort | |
|> Enum.chunk(5) | |
|> Enum.map(fn(x) -> Enum.shuffle(x) end) | |
# (A) is != to (B) | |
names = Enum.map(jobs, fn(x) -> x.name end) | |
sorted_names = Enum.sort(names) | |
chunked_names = Enum.chunk(sorted_names, 5) | |
shuffled_chunks = Enum.map(chunked_names, fn(x) -> Enum.shuffle(x) end) | |
# A == 14 more req/s and 4.2X LESS timeouts. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment