Runtime benchmarking for dala Elixir nodes.
Measure execution time, memory usage, reductions, and compare performance across different devices in the cluster.
Examples
# Measure a function on a remote node
{:ok, result, stats} = DalaDev.Benchmark.measure(
:"dala_qa@192.168.1.5",
fn -> MyApp.heavy_computation() end
)
# Compare performance across nodes
DalaDev.Benchmark.compare([node1, node2], test_module: MyBench)
# Profile memory usage
DalaDev.Benchmark.memory_profile(node, duration: 60_000)
Summary
Functions
Compare performance across multiple nodes.
Measure execution time and resource usage of a function on a remote node.
Profile memory usage on a node over time.
Generate a benchmark report.
Types
Functions
@spec compare( [node_ref()], keyword() ) :: [benchmark_result()]
Compare performance across multiple nodes.
Options:
:test_module- Module containing benchmark functions:test_function- Function to call (default: :run/0):iterations- Number of iterations per node
Returns a list of benchmark results for comparison.
@spec measure(node_ref(), (-> any()), keyword()) :: {:ok, any(), benchmark_result()} | {:error, term()}
Measure execution time and resource usage of a function on a remote node.
Options:
:timeout- RPC timeout in ms (default: 30_000):warmup- Number of warmup iterations (default: 1):iterations- Number of measurement iterations (default: 1)
Returns {:ok, result, stats} or {:error, reason}.
Profile memory usage on a node over time.
Options:
:duration- Profile duration in ms (default: 60_000):interval- Sampling interval in ms (default: 1_000)
Returns memory statistics over time.
@spec report( [benchmark_result()], keyword() ) :: {:ok, String.t() | :ok} | {:error, term()}
Generate a benchmark report.
Options:
:format- :text (default), :html, or :json:output- Output file path (optional)
Returns the report content or :ok if saved to file.