Raxol.Benchmark.Config (Raxol v2.0.1)

View Source

Configuration and utilities for Raxol performance benchmarking. Centralizes benchmark settings, performance targets, and reporting configuration.

Features

  • Profile-based configuration (quick, standard, comprehensive, ci)
  • Dynamic performance targets with statistical thresholds
  • Environment-aware settings
  • Regression detection with configurable sensitivity
  • Benchmark metadata and tagging

Summary

Functions

Get all performance targets.

Get benchmark configuration by type. Supports environment variable overrides and profile inheritance.

Calculate dynamic threshold based on historical data.

Detect performance regressions by comparing results.

Ensure output directories exist. Creates profile-specific subdirectories if needed.

Get performance targets for a specific benchmark category. Applies environment-based adjustments if configured.

Load previous benchmark results for comparison.

Check if a benchmark result meets performance targets. Includes statistical significance check when sufficient samples available.

Get available metadata tags.

Generate timestamped output paths for benchmark results.

Get regression threshold for a category (percentage).

Get statistical configuration.

Generate test scenarios for different benchmark categories.

Validate benchmark configuration. Ensures all required settings are present and valid.

Functions

all_targets()

Get all performance targets.

benchmark_config(type \\ nil)

Get benchmark configuration by type. Supports environment variable overrides and profile inheritance.

calculate_dynamic_threshold(category, benchmark_name, history \\ [])

Calculate dynamic threshold based on historical data.

detect_regression(category, old_result_us, new_result_us)

Detect performance regressions by comparing results.

ensure_output_dirs(profile \\ nil)

Ensure output directories exist. Creates profile-specific subdirectories if needed.

get_targets(category, opts \\ [])

Get performance targets for a specific benchmark category. Applies environment-based adjustments if configured.

load_previous_results(category)

Load previous benchmark results for comparison.

meets_target?(category, benchmark_name, result_us, opts \\ [])

Check if a benchmark result meets performance targets. Includes statistical significance check when sufficient samples available.

metadata_tags()

Get available metadata tags.

output_paths(timestamp \\ nil)

Generate timestamped output paths for benchmark results.

regression_threshold(category)

Get regression threshold for a category (percentage).

statistical_config()

Get statistical configuration.

test_scenarios(category)

Generate test scenarios for different benchmark categories.

validate_config(config)

Validate benchmark configuration. Ensures all required settings are present and valid.