Performance profiling for dala Elixir nodes using :eprof and :fprof.
Provides CPU profiling, flame graphs, and performance analysis for dala Elixir cluster nodes.
Examples:
# Profile a function on a node
{:ok, profile} = DalaDev.Profiling.profile(
:"dala_qa@192.168.1.5",
fn -> MyApp.heavy_computation() end
)
# Analyze profile
{:ok, analysis} = DalaDev.Profiling.analyze(profile)
# Generate flame graph (HTML)
DalaDev.Profiling.flame_graph(profile, "flame.html")
Summary
Functions
Analyze profile data and generate a summary.
Generate a flame graph from profile data.
Profile a function on a remote node using :eprof.
Types
@type analysis() :: map()
@type node_ref() :: node() | DalaDev.Device.t() | String.t()
@type profile_data() :: term()
Functions
@spec analyze(profile_data()) :: {:ok, analysis()} | {:error, term()}
Analyze profile data and generate a summary.
Returns a map with:
:total_time- Total execution time:calls- Number of function calls:top_functions- List of {module, function, time, calls}:bottlenecks- Functions with highest time consumption
@spec flame_graph( profile_data(), keyword() ) :: {:ok, String.t() | :ok} | {:error, term()}
Generate a flame graph from profile data.
Options:
:format- :html (default) or :text:output- Output file path (optional)
Returns the report content or :ok if saved to file.
@spec profile(node_ref(), (-> any()), keyword()) :: {:ok, profile_data()} | {:error, term()}
Profile a function on a remote node using :eprof.
Options:
:timeout- RPC timeout in ms (default: 60_000):duration- Profile duration in ms (default: 10_000)
Returns {:ok, profile_data} or {:error, reason}.