ElixirScope.ASTRepository.FunctionData (elixir_scope v0.0.1)
Function-level data structure with static analysis and runtime correlation.
This structure stores comprehensive information about individual functions including:
- Function AST and metadata
- Static analysis results
- Runtime execution data
- Performance metrics
- Error patterns
Summary
Functions
Adds a call pattern observation.
Adds a return pattern observation.
Calculates the error rate for this function.
Gets the AST node IDs for this function.
Gets the correlation IDs associated with this function.
Checks if this function has runtime execution data.
Checks if this function is considered a performance bottleneck.
Creates a new FunctionData structure from function AST.
Records an error event for this function.
Records a function execution event.
Updates the performance profile with new execution data.
Types
@type ast_node_id() :: binary()
@type correlation_id() :: binary()
@type function_key() :: {module_name(), function_name(), arity()}
@type function_name() :: atom()
@type module_name() :: atom()
@type t() :: %ElixirScope.ASTRepository.FunctionData{ annotations: term(), arity: term(), ast: term(), ast_node_mapping: term(), attributes: term(), call_patterns: term(), complexity_metrics: term(), correlation_metadata: term(), created_at: term(), dependencies: term(), documentation: term(), error_history: term(), execution_count: term(), execution_statistics: term(), first_execution: term(), function_key: term(), function_name: term(), guards: term(), hot_path_indicator: term(), instrumentation_points: term(), last_execution: term(), module_name: term(), performance_profile: term(), purity_analysis: term(), return_patterns: term(), side_effects: term(), source_location: term(), type: term(), type_signature: term(), updated_at: term(), version: term(), visibility: term() }
Functions
Adds a call pattern observation.
Adds a return pattern observation.
Calculates the error rate for this function.
@spec get_ast_node_ids(t()) :: [ast_node_id()]
Gets the AST node IDs for this function.
@spec get_correlation_ids(t()) :: [correlation_id()]
Gets the correlation IDs associated with this function.
Checks if this function has runtime execution data.
Checks if this function is considered a performance bottleneck.
@spec new(function_key(), term(), keyword()) :: t()
Creates a new FunctionData structure from function AST.
Parameters
function_key
- The {module, function, arity} tupleast
- The function ASTopts
- Optional parameters including source_location, visibility, etc.
Records an error event for this function.
Records a function execution event.
Updates the performance profile with new execution data.