ElixirScope.AI.ComplexityAnalyzer (elixir_scope v0.0.1)

Analyzes code complexity for Elixir modules and functions.

Provides rule-based complexity analysis to inform instrumentation decisions. Initially implemented with heuristics, designed to be enhanced with ML models.

Summary

Functions

Analyzes complexity for an entire module.

Analyzes state complexity for stateful modules (GenServer, Agent, etc.).

Calculates complexity for a single AST node (function or expression).

Determines if a module or function is performance critical.

Functions

analyze_module(ast)

Analyzes complexity for an entire module.

analyze_state_complexity(ast)

Analyzes state complexity for stateful modules (GenServer, Agent, etc.).

calculate_complexity(ast)

Calculates complexity for a single AST node (function or expression).

is_performance_critical?(ast)

Determines if a module or function is performance critical.