ExESDB.Debugger (ex_esdb v0.11.0)
Comprehensive debugging and inspection API for ExESDB systems.
This module provides REPL-friendly functions to investigate all aspects of an ExESDB Event Sourcing Database by delegating to specialized subsystems:
- Process supervision tree inspection (Inspector)
- Health and performance monitoring (Monitor)
- Scenario testing and simulation (ScenarioManager)
- Real-time observation (Observer)
Usage in REPL
iex> ExESDB.Debugger.overview()
iex> ExESDB.Debugger.start_scenario(:high_load, intensity: :medium)
iex> ExESDB.Debugger.observe(:system_metrics)
Summary
Functions
Benchmark a function.
Show detailed configuration for the store.
Perform comprehensive health check.
Show help information for all available debugging commands.
List all active observations.
List all running scenarios.
Get observation data for analysis.
Start real-time observation of system components.
Display a comprehensive overview of the ExESDB system.
Show performance metrics.
List all ExESDB-related processes with formatted output.
Start a test scenario.
Stop a running observation.
Stop a running scenario.
Display the supervision tree for ExESDB.
Show top processes by memory/CPU usage.
Trace function calls for debugging.
Functions
Benchmark a function.
Show detailed configuration for the store.
Perform comprehensive health check.
Show help information for all available debugging commands.
List all active observations.
List all running scenarios.
Get observation data for analysis.
Start real-time observation of system components.
Available targets:
:system_metrics- Overall system metrics:process_metrics- Specific process metrics (requires :target_process opt):memory_usage- Memory usage patterns
Examples
ExESDB.Debugger.observe(:system_metrics, interval: 1000)
ExESDB.Debugger.observe(:process_metrics, target_process: :my_process, interval: 2000)
Display a comprehensive overview of the ExESDB system.
Show performance metrics.
List all ExESDB-related processes with formatted output.
Start a test scenario.
Available scenarios:
:high_load- Simulate high CPU/memory load:node_failure- Simulate node failures:custom- Load custom scenario from config
Examples
ExESDB.Debugger.start_scenario(:high_load, intensity: :medium, duration: 30_000)
ExESDB.Debugger.start_scenario(:custom, config_path: "scenarios/custom.json")
Stop a running observation.
Stop a running scenario.
Display the supervision tree for ExESDB.
Show top processes by memory/CPU usage.
Trace function calls for debugging.