ElixirScope.ASTRepository.ModuleData (elixir_scope v0.0.1)
Complete module representation with static AST and runtime correlation data.
This structure stores all information about a module including:
- Original AST with instrumentation metadata
- Static analysis results
- Runtime correlation data
- Performance metrics
Summary
Functions
Adds an error pattern to the module's runtime data.
Gets the AST node IDs for this module.
Gets the correlation IDs associated with this module.
Gets all function keys for this module.
Checks if the module has runtime correlation data.
Creates a new ModuleData structure from parsed AST.
Updates execution frequency data for a specific function.
Updates performance data for a specific function.
Updates the runtime insights for this module.
Types
@type ast_node_id() :: binary()
@type correlation_id() :: binary()
@type function_key() :: {module_name(), atom(), non_neg_integer()}
@type module_name() :: atom()
@type t() :: %ElixirScope.ASTRepository.ModuleData{ ast: term(), ast_node_mapping: term(), attributes: term(), callbacks: term(), compilation_hash: term(), compilation_timestamp: term(), complexity_metrics: term(), correlation_metadata: term(), created_at: term(), dependencies: term(), error_patterns: term(), execution_frequency: term(), exports: term(), instrumentation_points: term(), message_flows: term(), module_name: term(), module_type: term(), patterns: term(), performance_data: term(), runtime_insights: term(), source_file: term(), updated_at: term(), version: term() }
Functions
Adds an error pattern to the module's runtime data.
@spec get_ast_node_ids(t()) :: [ast_node_id()]
Gets the AST node IDs for this module.
@spec get_correlation_ids(t()) :: [correlation_id()]
Gets the correlation IDs associated with this module.
@spec get_function_keys(t()) :: [function_key()]
Gets all function keys for this module.
Checks if the module has runtime correlation data.
@spec new(module_name(), term(), keyword()) :: t()
Creates a new ModuleData structure from parsed AST.
Parameters
module_name
- The module name (atom)ast
- The parsed ASTopts
- Optional parameters including source_file, instrumentation_points, etc.
@spec update_execution_frequency(t(), function_key(), non_neg_integer()) :: t()
Updates execution frequency data for a specific function.
@spec update_performance_data(t(), function_key(), map()) :: t()
Updates performance data for a specific function.
Updates the runtime insights for this module.