Skip to content

Instantly share code, notes, and snippets.

Last active Sep 27, 2021
What would you like to do?
Show what's using memory
# show top memory using processes
|> pid ->
:erlang.process_info(pid, [:memory, :current_function, :current_location])
|> Enum.sort_by(fn process_info -> process_info[:memory] end)
|> Enum.reverse()
|> Enum.take(25)
# show top memory using ETS tables
|> table ->
[memory:, :memory), size:, :size), name:, :name)]
|> Enum.sort()
|> Enum.reverse()
|> Enum.take(25)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment