Pipeline.Performance.BenchmarkRunner (PipelineEx v0.1.1)

View Source

Automated benchmark runner for comparing sync vs async streaming performance.

Provides utilities to run standardized benchmarks and generate reports.

Summary

Functions

Compare results between sync and async modes.

Run a specific benchmark test.

Run a complete benchmark suite comparing sync and async modes.

Types

benchmark_result()

@type benchmark_result() :: %{
  test_name: String.t(),
  mode: :sync | :async,
  size: atom(),
  iteration: non_neg_integer(),
  duration_ms: non_neg_integer(),
  ttft_ms: non_neg_integer() | nil,
  throughput: float() | nil,
  memory_peak: non_neg_integer(),
  metrics: map()
}

t()

@type t() :: %Pipeline.Performance.BenchmarkRunner{
  analyzer: Pipeline.Streaming.PerformanceAnalyzer.t(),
  end_time: DateTime.t() | nil,
  options: map(),
  results: [benchmark_result()],
  start_time: DateTime.t()
}

Functions

compare_results(results)

@spec compare_results([benchmark_result()]) :: map()

Compare results between sync and async modes.

run_single_benchmark(workflow, mode)

@spec run_single_benchmark(map(), :sync | :async) ::
  {:ok, benchmark_result()} | {:error, term()}

Run a specific benchmark test.

run_suite(opts \\ [])

@spec run_suite(keyword()) :: {:ok, t()}

Run a complete benchmark suite comparing sync and async modes.