tracex v0.1.0 Tracex.Trace View Source
Collection of helpers to extract data from compiler traces
Compiler traces encapsulate events happening in certain environment.
The module originating an event is considered an outbound module, the module on the receiving end is considered an inbound module.
For example, consider a trace emitted when module A
imports a function
from module B
. A
is denoted as outbound and B
as inbound.
Traces of local function or marco calls naturally have the same module as both inbound and outbound.
Note that inbound/outbound notions translate directly to direction of the edge between the two modules involved in project's module dependency graph.
Link to this section Summary
Functions
Returns function name and arity formatted as function/arity
for remote call traces
Returns location in code where a trace originates formatted as path:line
Returns true if given module
is on the receiving end of the traced event
Returns trace's inbound module
Returns true if trace describes using given module via use GivenModule
Returns true if trace describes a module definition
Returns true if given module
is originating the traced event
Returns trace's outbound module
Returns true if trace describes a remote function or macro call
Link to this section Types
env()
View Sourceenv() :: %{ aliases: Macro.Env.aliases(), context: Macro.Env.context(), context_modules: Macro.Env.context_modules(), file: binary(), function: Macro.Env.name_arity() | nil, line: Macro.Env.line(), module: atom() }
Link to this section Functions
Returns function name and arity formatted as function/arity
for remote call traces
Returns location in code where a trace originates formatted as path:line
Elixir compiler does not always provide a precise line number of the code in question, but rather the line of where its execution environment is defined.
For example if an event originates in function's body, a line in which the function is defined is returned.
Returns true if given module
is on the receiving end of the traced event
Returns trace's inbound module
Returns true if trace describes using given module via use GivenModule
Returns true if trace describes a module definition
Returns true if given module
is originating the traced event
Returns trace's outbound module
Returns true if trace describes a remote function or macro call