Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,13 @@ _build
*.iml
rebar3.crashdump
*~

# Ignore generated flamegraphs
*.bggg
flamegraphs/*

# Ignore generated documentation html
doc/*.html
doc/*.png
doc/*.css
doc/edoc-info
20 changes: 20 additions & 0 deletions doc/overview.edoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@title

@doc
<img src="eflambe-torch-logo.png" style="max-width: 100%"/>

eFlambè is designed to be the first profiling tool you reach for during development. It is designed for rapid visualization of program execution. It generates one or more flamegraphs of any function you specify. You can easily select function(s) to profile in the shell without having to alter your code or restart your application. This tool has two distinct advantages over existing flamegraph generators in Erlang:

<ul>
<li>It doesn’t require the user to insert profiling code into the functions they want to visualize as flamegraphs. Everything can be done on the fly without restarting your application.</li>
<li>It generates output in formats used by most flamegraph viewers. No manual post-processing is needed.</li>
<li>No Perl code.</li>
</ul>

<h3>For usage see the {@link eflambe} API documentation.</h3>
<h4>Source code and issuer tracker are on <a href="https://github.com/Stratus3D/eflambe">GitHub</a></h4>

<img src="screenshot-speedscope.png" style="width: 100%"/>

Copyright © 2021 Trevor Brown (Apache-2.0 License)
@end
6 changes: 3 additions & 3 deletions src/eflambe.erl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
%%%-------------------------------------------------------------------
%%% @copyright 2021 Trevor Brown (Apache-2.0 License)
%%% @doc
%%% This module provides the public API for eflambe. These public functions are
%%% intended to be invoked by the end user to perform profiling of their
%%% application.
%%% eflambe profiling functions. Invoke these public functions to perform
%%% profiling of functions in your Erlang/Elixir application.
%%% @end
%%%-------------------------------------------------------------------
-module(eflambe).
Expand Down
1 change: 1 addition & 0 deletions src/eflambe_app.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
%%%-------------------------------------------------------------------
%% @doc eflambe public API
%% @end
%% @hidden
%%%-------------------------------------------------------------------

-module(eflambe_app).
Expand Down
1 change: 1 addition & 0 deletions src/eflambe_brendan_gregg.erl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
%%%-------------------------------------------------------------------
%%% @copyright 2021 Trevor Brown (Apache-2.0 License)
%%% @doc
%%% Writes trace data to file formatted as Brendan Gregg's collapsed stack
%%% format.
Expand Down
1 change: 1 addition & 0 deletions src/eflambe_meck.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
%%% @doc
%%% Helper functions for mocking with meck in eflambe
%%% @end
%%% @hidden
%%%-------------------------------------------------------------------
-module(eflambe_meck).

Expand Down
1 change: 1 addition & 0 deletions src/eflambe_output_formatter.erl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
%%%-------------------------------------------------------------------
%%% @copyright 2021 Trevor Brown (Apache-2.0 License)
%%% @doc
%%% Output formatter behaviour. This behavior is used so we can swap in a stub
%%% for testing the tracer.
Expand Down
1 change: 1 addition & 0 deletions src/eflambe_plain.erl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
%%%-------------------------------------------------------------------
%%% @copyright 2021 Trevor Brown (Apache-2.0 License)
%%% @doc
%%% Generates raw trace messages. This output format is for testing.
%%% @end
Expand Down
13 changes: 7 additions & 6 deletions src/eflambe_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
%%% E flambe server stores state for a capture trace that has been started.
%%% When no traced processes remain the server shuts down automatically.
%%% @end
%%% @hidden
%%%-------------------------------------------------------------------
-module(eflambe_server).

Expand Down Expand Up @@ -69,8 +70,8 @@ start_link(MFA, Options) ->

%%--------------------------------------------------------------------
%% @doc
%% Calls the eflambe_server gen_server to start a tracer for the current
%% process. This is only used for `capture` style traces.
%% Calls the `eflambe_server' gen_server to start a tracer for the current
%% process. This is only used for `capture' style traces.
%%
%% @end
%%--------------------------------------------------------------------
Expand All @@ -89,8 +90,8 @@ start_capture_trace(ServerPid) ->

%%--------------------------------------------------------------------
%% @doc
%% Calls the eflambe_server gen_server to stop a tracer for a specific
%% process. This is only used for `capture` style traces.
%% Calls the `eflambe_server' gen_server to stop a tracer for a specific
%% process. This is only used for `capture' style traces.
%%
%% @end
%%--------------------------------------------------------------------
Expand All @@ -103,7 +104,7 @@ stop_capture_trace(ServerPid, Return) ->
%%--------------------------------------------------------------------
%% @doc
%% Starts the tracer in the current process (no gen_server). This is
%% used for `apply` style traces only.
%% used for `apply' style traces only.
%%
%% @end
%%--------------------------------------------------------------------
Expand All @@ -121,7 +122,7 @@ start_trace(Options) ->
%%--------------------------------------------------------------------
%% @doc
%% Stops a tracer and finishes a trace in the current process. This is
%% used for `apply` style traces only as everything is done in the
%% used for `apply' style traces only as everything is done in the
%% current process.
%%
%% @end
Expand Down
1 change: 1 addition & 0 deletions src/eflambe_sup.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
%%%-------------------------------------------------------------------
%% @doc eflambe top level supervisor.
%% @end
%% @hidden
%%%-------------------------------------------------------------------

-module(eflambe_sup).
Expand Down
6 changes: 6 additions & 0 deletions src/eflambe_svg.erl
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
%%%-------------------------------------------------------------------
%%% @copyright 2021 Trevor Brown (Apache-2.0 License)
%%% @doc
%%% Generates SVG graphics from trace messages.
%%% @end
%%%-------------------------------------------------------------------
-module(eflambe_svg).

-behaviour(eflambe_output_formatter).
Expand Down
1 change: 1 addition & 0 deletions src/eflambe_tracer.erl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
%%% gen_server is only intended to be used by the eflambe_server to receive
%%% trace messages and write them to the appropriate formatter module.
%%% @end
%%% @hidden
%%%-------------------------------------------------------------------
-module(eflambe_tracer).

Expand Down