phoenixframework / phoenix_live_dashboard

Realtime dashboard with metrics, request logging, plus storage, OS and VM insights

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Memory Allocators tab

josevalim opened this issue · comments

We have this page on Observer and I think it can be really useful for tracking memory growth in projects:

image

I am also trying to move the instrument.erl module to runtime_tools in Erlang/OTP 26.0. It is basically a tool for generating histograms of memory allocation.

The code for getting allocator information is easy:

alloc_info() ->
    AlcuAllocs = erlang:system_info(alloc_util_allocators),
    try erlang:system_info({allocator_sizes, AlcuAllocs}) of
	Allocators -> Allocators
    catch _:_ -> []
    end.