Example flamegraph This is an example flamegraph generated by Incendium.
Flamegraphs are highly dynamic thanks to the d3
library.
Ýou can click on a horizontal rectangle (which represents a function call)
to zoom in on the rectangle and its descendants.
You can use the search form on the top right to search for a specific function name.
root
<0.861.0>
eflame:apply1/3
Elixir.MedivWeb.Inpatient.InpatientEpisodeController:-new/2-fun-0-/1
Elixir.Phoenix.Controller:render_and_send/4
Elixir.Plug.Conn:send_resp/1
Elixir.Ecto.Repo.Queryable:all/3
Elixir.Mediv.Inpatient.InpatientEpisode:changeset/2
Elixir.Phoenix.Controller:prepare_assigns/4
Elixir.Phoenix.View:render_to_iodata/3
Elixir.Plug.Conn:run_before_send/2
Elixir.Ecto.Repo.Queryable:execute/4
Elixir.Ecto.Changeset:cast/6
Elixir.Ecto.Changeset:cast_relation/4
Elixir.Ecto.Changeset:validate_required/3
Elixir.Forage:put_assoc/3
Elixir.Phoenix.Controller:layout/3
Elixir.MedivWeb.InpatientLayoutView:layout.html/1
Elixir.Phoenix.View:render_within/3
Elixir.Enum:-reduce/3-lists^foldl/2-0-/3
Elixir.Ecto.Adapters.SQL:execute/5
Elixir.Ecto.Query.Planner:query/5
Elixir.Enum:-map/2-lists^map/1-0-/2
Elixir.Enum:-reduce/3-lists^foldl/2-0-/3
Elixir.Access:get/3
Elixir.Ecto.Changeset:cast_key/1
Elixir.Enum:-reduce/3-lists^foldl/2-0-/3
Elixir.Gettext:dpgettext/5
Elixir.MedivWeb.InpatientLayoutView:sidebar.html/1
Elixir.Phoenix.HTML.Engine:fetch_assign!/2
Elixir.Phoenix.HTML.Tag:tag/2
Elixir.MedivWeb.Inpatient.InpatientEpisodeView:new.html/1
Elixir.Phoenix.LiveReloader:-before_send_inject_reloader/3-fun-1-/3
Elixir.Plug.CSRFProtection:ensure_same_origin_and_csrf_token!/3
Elixir.Plug.Telemetry:-call/2-fun-0-/4
Elixir.Ecto.Adapters.SQL:execute!/4
Elixir.Ecto.Query.Planner:plan/3
Elixir.Ecto.Repo.Queryable:-preprocessor/3-fun-0-/5
Elixir.Ecto.Changeset:process_param/7
erlang:atom_to_binary/2
Elixir.Ecto.Changeset:-validate_required/3-fun-0-/5
Elixir.Application:fetch_env!/2
Elixir.MedivWeb.Gettext:handle_missing_translation/4
Elixir.Gettext:dpgettext/5
Elixir.Phoenix.Router.Helpers:path/3
Elixir.Access:fetch/2
Elixir.Phoenix.HTML.Tag:build_attrs/3
Elixir.MedivWeb.Inpatient.InpatientEpisodeView:form.html/1
Elixir.Phoenix.HTML.Tag:content_tag/3
Elixir.Phoenix.LiveReloader:reload_assets_tag/3
Elixir.Plug.CSRFProtection:js_content_type?/1
lists:foreach/2
Elixir.Ecto.Adapters.Postgres.Connection:execute/4
Elixir.Ecto.Query.Planner:plan_sources/2
Elixir.Ecto.Repo.Queryable:struct_load!/6
Elixir.Ecto.Changeset:cast_key/1
Elixir.Ecto.Changeset:missing?/3
Elixir.Gettext.Interpolation:to_interpolatable/1
Elixir.Application:fetch_env!/2
Elixir.MedivWeb.Gettext:handle_missing_translation/4
Elixir.Phoenix.Router.Helpers:build_own_forward_path/3
Elixir.String:replace_guarded/4
Elixir.Phoenix.HTML.Form:form_for/4
Elixir.Phoenix.HTML.Tag:build_attrs/3
Elixir.Enum:-map/2-lists^map/1-0-/2
Elixir.Plug.Conn:get_resp_header/2
telemetry:-execute/3-fun-0-/4
Elixir.DBConnection:execute/4
Elixir.DBConnection:log/5
Elixir.Ecto.Type:adapter_load/3
erlang:atom_to_binary/2
Elixir.Ecto.Changeset:get_field/3
Elixir.Gettext.Interpolation:interpolate/4
maps:find/2
Elixir.Keyword:get/3
Elixir.MedivWeb.Inpatient.InpatientEpisodeView:-form.html/1-fun-19-/2
Elixir.Phoenix.HTML.Form:form_for/3
Elixir.Phoenix.HTML.Tag:form_tag/2
Elixir.Phoenix.HTML.Tag:dasherize/1
Elixir.Phoenix.LiveReloader:-attrs/1-fun-0-/1
Elixir.Enum:-reduce/3-lists^foldl/2-0-/3
logger_backend:call_handlers/3
Elixir.DBConnection:run/6
Elixir.DBConnection.LogEntry:parse_times/2
Elixir.Ecto.Adapters.SQL:log/4
Elixir.Ecto.Type:of_base_type?/2
Elixir.Enum:-reduce/3-lists^foldl/2-0-/3
Elixir.ForageWeb.ForageView:forage_form_group/5
Elixir.ForageWeb.ForageView:forage_generic_form_check/6
Elixir.Gettext:dpgettext/5
Elixir.Phoenix.HTML.Form:inputs_for/4
Elixir.Phoenix.HTML.FormData.Ecto.Changeset:to_form/2
error_handler:undefined_function/3
Elixir.Phoenix.HTML.Tag:csrf_token_tag/3
Elixir.Phoenix.HTML.Tag:tag/2
Elixir.Phoenix.LiveReloader:key/1
Elixir.Logger.Handler:log/2
Elixir.DBConnection:checkout/3
Elixir.DBConnection:run_execute/5
erlang:monotonic_time/0
Elixir.Logger:__do_log__/4
logger_backend:call_handlers/3
Elixir.MedivWeb.Inpatient.InpatientEpisodeView:-form.html/1-fun-16-/2
Elixir.ForageWeb.ForageView:forage_error_tag/3
Elixir.ForageWeb.ForageView:forage_generic_input/5
Elixir.ForageWeb.ForageView:forage_multiple_select/3
Elixir.ForageWeb.ForageView:forage_select/3
Elixir.ForageWeb.ForageView:forage_static_select/3
Elixir.MedivWeb.Inpatient.InpatientEpisodeView:-form.html/1-fun-2-/3
Elixir.MedivWeb.Inpatient.InpatientEpisodeView:-form.html/1-fun-7-/3
Elixir.Phoenix.HTML.Form:checkbox/3
Elixir.Phoenix.HTML.Form:label/4
Elixir.Phoenix.HTML.Form:textarea/3
Elixir.Phoenix.HTML.Tag:content_tag/3
Elixir.Phoenix.HTML.Tag:tag/2
Elixir.ForageWeb.ForageView:forage_generic_input/5
Elixir.Phoenix.HTML.Form:checkbox/3
Elixir.Phoenix.HTML.Form:label/4
Elixir.Phoenix.HTML.Tag:content_tag/3
Elixir.Application:fetch_env!/2
Elixir.Gettext:get_locale/1
Elixir.MedivWeb.Gettext:handle_missing_translation/4
Elixir.MedivWeb.Gettext:lgettext/5
Elixir.Enum:-map/2-lists^map/1-0-/2
Elixir.Keyword:-take/2-lists^filter/1-0-/2
Elixir.Phoenix.HTML.FormData.Ecto.Changeset:to_form/4
Elixir.Keyword:pop/3
code_server:call/1
Elixir.Plug.CSRFProtection:get_csrf_token/0
Elixir.Phoenix.HTML.Tag:build_attrs/3
Elixir.String:replace_guarded/4
Elixir.Logger.Utils:timestamp/2
Elixir.DBConnection.Holder:checkout/3
Elixir.DBConnection.Holder:holder_apply/4
Elixir.Ecto.Adapters.SQL:log_iodata/2
Elixir.Logger.Handler:log/2
Elixir.Plug.HTML:to_iodata/5
Elixir.Keyword:get_values/2
Elixir.Keyword:get_values/3
Elixir.Keyword:pop/3
Elixir.Plug.HTML:to_iodata/5
Elixir.String.Chars.Atom:to_string/1
Elixir.Keyword:fetch!/2
Elixir.Keyword:get/3
Elixir.Plug.HTML:to_iodata/5
Elixir.String.Chars:to_string/1
Elixir.Enum:-reduce/3-lists^foldl/2-0-/3
Elixir.Phoenix.Router.Helpers:path/3
Elixir.Phoenix.Router.Helpers:path/3
Elixir.Keyword:-take/2-lists^filter/1-0-/2
Elixir.Phoenix.HTML.Form:input_id/2
Elixir.Phoenix.HTML.Tag:tag/2
Elixir.Keyword:put_new/3
Elixir.Phoenix.HTML.Form:input_id/2
Elixir.Phoenix.HTML.Form:input_value/2
Elixir.Phoenix.HTML.Tag:build_attrs/3
Elixir.Phoenix.HTML.Tag:tag_attrs/1
Elixir.Phoenix.HTML:html_escape/1
Elixir.Phoenix.HTML.Tag:build_attrs/3
Elixir.Phoenix.HTML.Tag:tag_attrs/1
Elixir.Keyword:pop/3
Elixir.Phoenix.HTML.Form:input_name/2
Elixir.Phoenix.HTML.Tag:tag/2
Elixir.Keyword:put_new/3
Elixir.Phoenix.HTML.Form:input_id/2
Elixir.Phoenix.HTML.Tag:tag_attrs/1
Elixir.Application:fetch_env/2
Elixir.Gettext.Interpolation:interpolate/4
Elixir.Gettext.Interpolation:to_interpolatable/1
Elixir.Phoenix.HTML.Form:-inputs_for/4-fun-0-/3
Elixir.Enum:member?/2
Elixir.Enum:-reduce/3-lists^foldl/2-0-/3
sleep
Elixir.Plug.CSRFProtection:mask/1
Elixir.Phoenix.HTML.Tag:dasherize/1
sleep
Elixir.DBConnection.Holder:checkout_call/5
Elixir.Postgrex.Protocol:bind_execute/4
Elixir.Postgrex.Protocol:handle_prepare_execute/4
Elixir.Ecto.Adapters.SQL:log_ok_source/1
Elixir.Ecto.Adapters.SQL:log_time/4
Elixir.Logger.Handler:erlang_metadata_to_elixir_metadata/1
gen_event:notify/2
erlang:atom_to_binary/2
lists:keyfind/3
Elixir.String.Chars:impl_for!/1
Elixir.ForageWeb.ForageView:-forage_static_select/3-fun-0-/4
Elixir.Phoenix.Router.Helpers:build_own_forward_path/3
Elixir.Keyword:-take/2-fun-0-/2
Elixir.String.Chars.Atom:to_string/1
Elixir.Phoenix.HTML.Tag:build_attrs/2
Elixir.Phoenix.HTML.Tag:build_attrs/3
Elixir.Phoenix.HTML.Tag:tag_attrs/1
Elixir.String.Chars.Atom:to_string/1
Elixir.Phoenix.HTML.FormData.Ecto.Changeset:input_value/4
Elixir.String:replace/4
Elixir.String:replace_guarded/4
Elixir.Enum:-reduce/3-lists^foldl/2-0-/3
Elixir.Plug.HTML:html_escape_to_iodata/1
Elixir.Plug.HTML:to_iodata/5
Elixir.String:replace_guarded/4
lists:mergel/2
Elixir.Enum:-reduce/3-lists^foldl/2-0-/3
Elixir.Keyword:fetch/2
Elixir.String.Chars.Atom:to_string/1
Elixir.Phoenix.HTML.Tag:build_attrs/3
Elixir.Phoenix.HTML.Tag:tag_attrs/1
Elixir.String.Chars.Atom:to_string/1
Elixir.Enum:-reduce/3-lists^foldl/2-0-/3
application_controller:get_env/2
Elixir.MedivWeb.Inpatient.InpatientEpisodeView:-form.html/1-fun-0-/1
Elixir.MedivWeb.Inpatient.InpatientEpisodeView:-form.html/1-fun-13-/2
Elixir.Phoenix.HTML.FormData.Ecto.Changeset:-to_form/4-fun-0-/8
crypto:exor/5
Elixir.Postgrex.Protocol:recv_bind/3
Elixir.Postgrex.Protocol:recv_execute/5
Elixir.Postgrex.Protocol:close_parse_describe_flush/3
Elixir.Kernel:inspect/2
io_lib_format:fwrite_g/1
Elixir.String.Chars:impl_for/1
Elixir.Phoenix.HTML.Safe.Integer:to_iodata/1
error_handler:undefined_function/3
erlang:atom_to_binary/2
Elixir.String:replace_guarded/4
Elixir.Enum:-reduce/3-lists^foldl/2-0-/3
erlang:atom_to_binary/2
Elixir.Keyword:get/3
sleep
Elixir.Phoenix.HTML.Tag:-tag_attrs/1-fun-0-/2
Elixir.Keyword:get/2
Elixir.Keyword:get/3
sleep
Elixir.Phoenix.HTML.Tag:-tag_attrs/1-fun-0-/2
Elixir.Phoenix.HTML.Tag:dasherize/1
Elixir.String:replace/3
Elixir.String:replace/4
Elixir.String:replace_guarded/4
Elixir.Enum:-reduce/3-lists^foldl/2-0-/3
erlang:atom_to_binary/2
Elixir.Phoenix.HTML.Tag:-tag_attrs/1-fun-0-/2
Elixir.ForageWeb.ForageView:forage_form_group/5
Elixir.Gettext:dpgettext/5
Elixir.ForageWeb.ForageView:forage_form_group/5
Elixir.Gettext:dpgettext/5
Elixir.Phoenix.HTML.FormData.Ecto.Changeset:to_changeset/4
Elixir.Postgrex.Protocol:msg_recv/4
Elixir.Postgrex.Protocol:rows_recv/4
Elixir.Postgrex.Protocol:recv_close/3
Elixir.Postgrex.Protocol:recv_parse_describe/4
io_lib_format:fwrite_g_1/2
Elixir.String.Chars.Atom:__impl__/1
erlang:integer_to_binary/1
code_server:call/1
Elixir.Keyword:get/3
Elixir.Phoenix.HTML.Tag:-tag_attrs/1-fun-0-/2
lists:keyfind/3
Elixir.Plug.HTML:html_escape_to_iodata/1
Elixir.Plug.HTML:to_iodata/5
lists:keyfind/3
Elixir.Phoenix.HTML.Safe:to_iodata/1
Elixir.Plug.HTML:to_iodata/5
Elixir.Keyword:get/3
sleep
Elixir.Phoenix.HTML.Tag:-tag_attrs/1-fun-0-/2
Elixir.Plug.HTML:to_iodata/5
Elixir.Phoenix.HTML.Form:label/4
Elixir.Phoenix.HTML.Tag:content_tag/3
Elixir.Phoenix.HTML.Tag:tag/2
Elixir.Application:fetch_env!/2
Elixir.ForageWeb.ForageView:forage_select/3
Elixir.Phoenix.HTML.Tag:content_tag/3
Elixir.Phoenix.HTML.Tag:tag/2
Elixir.MedivWeb.Gettext:handle_missing_translation/4
Elixir.Phoenix.HTML.FormData.Ecto.Changeset:cast!/2
prim_inet:recv0/3
Elixir.Postgrex.DefaultTypes:Elixir.Postgrex.Extensions.Raw/6
Elixir.Postgrex.DefaultTypes:Elixir.Postgrex.Extensions.Timestamp/6
Elixir.Postgrex.Protocol:msg_recv/4
Elixir.Postgrex.Protocol:recv_describe/4
io_lib_format:convert_to_decimal/3
sleep
lists:keyfind/3
Elixir.Plug.HTML:to_iodata/5
Elixir.Phoenix.HTML.Safe:impl_for!/1
Elixir.Phoenix.HTML.Form:input_id/2
Elixir.Phoenix.HTML.Tag:tag_attrs/1
Elixir.String.Chars:to_string/1
Elixir.Phoenix.HTML.Tag:build_attrs/3
Elixir.Phoenix.HTML.Tag:tag_attrs/1
Elixir.Application:fetch_env/2
Elixir.Map:get/2
Elixir.Phoenix.HTML:html_escape/1
Elixir.Phoenix.HTML.Tag:build_attrs/3
Elixir.Gettext.Interpolation:to_interpolatable/1
Elixir.Ecto.Changeset:-on_cast_default/2-fun-0-/4
prim_inet:async_recv/3
Elixir.NaiveDateTime:from_erl!/3
Elixir.Postgrex.Extensions.Timestamp:microsecond_to_elixir/2
prim_inet:recv0/3
Elixir.Postgrex.Protocol:msg_recv/3
io_lib_format:pow5bits/1
Elixir.Phoenix.HTML.Safe:impl_for/1
Elixir.String.Chars:to_string/1
Elixir.Enum:-reduce/3-lists^foldl/2-0-/3
Elixir.String.Chars:impl_for!/1
Elixir.Phoenix.HTML.Tag:dasherize/1
Elixir.Enum:-reduce/3-lists^foldl/2-0-/3
application_controller:get_env/2
Elixir.Plug.HTML:to_iodata/5
Elixir.String:replace_guarded/4
Elixir.Ecto.Changeset:cast_relation/4
Elixir.Mediv.Inpatient.Patient:changeset/2
prim_inet:ctl_cmd/3
Elixir.NaiveDateTime:from_erl/3
Elixir.Postgrex.Extensions.Timestamp:split/2
prim_inet:async_recv/3
Elixir.Postgrex.Protocol:msg_decode/1
Elixir.String.Chars:impl_for!/1
Elixir.String.Chars:impl_for/1
sleep
Elixir.Ecto.Changeset:cast/6
Elixir.Ecto.Changeset:validate_required/3
erlang:port_control/3
Elixir.NaiveDateTime:new/8
calendar:gregorian_seconds_to_datetime/1
prim_inet:ctl_cmd/3
Elixir.Postgrex.Messages:parse/3
Elixir.String.Chars:impl_for/1
Elixir.String.Chars.Atom:__impl__/1
Elixir.Enum:-reduce/3-lists^foldl/2-0-/3
Elixir.Enum:-reduce/3-lists^foldl/2-0-/3
calendar:gregorian_days_to_date/1
erlang:port_control/3
Elixir.Ecto.Changeset:process_param/7
Elixir.Ecto.Changeset:-validate_required/3-fun-0-/5
Elixir.Ecto.Changeset:cast_key/1
Elixir.Access:get/3
erlang:atom_to_binary/2
lists:keyfind/3
The Download link allows you to download the flamegraph as a javascript file.
To draw the flamegraph in a webpage you just have to add an inline <script>
that references the javascript file.
You don't even need to call any javascript.
The script automatically inserts the flamgeraph just before the script tag.
For the flamegraph to work properly, you must include the incendium.js
and incendium.css
in the webpage (the generated javascript code dependes on the javascript in incendium.js
). While incendium could be changed in order to generate completely standalone javascript, if you want to include several flamegrpahs in the same webpage, including the entire contents of incendium.js
would be very wasteful.
For example, the flamegraph above was generated by the following HTML:
<link rel="stylesheet" href="assets/incendium.css" />
<script src="assets/incendium.js" charset="utf-8"></script>
<script type="text/javascript" src="assets/incendium_flamegraph_hkctthqlqhcubcsgrazymmvaldzllxbq.js"></script>