tracex v0.1.0 Tracex View Source
Tracex is a tool for static analysis of mix projects
It builds upon compiler tracing introduced in Elixir 1.10, simplifying collection of traces and turning them into valuable insights.
Tracex collects traces emitted by Elixir compiler and performs some basic data extraction and classification. The result, together with project's metadata built along the way, is available to the developer for further analysis.
Tracex automatically recognizes some common types of modules present in mix projects, like Ecto schemas or Phoenix controllers and views. Additionally it supports attaching custom classifiers that are specific to your project in order to collect extra information that may prove helpful in actual analysis.
Elixir compiler emits a lot of traces. For practical reasons tracex collets only ones that are local to your project. It means that any traces of interactions of your project's code with Elixir's core modules or external libraries are discarded.
Link to this section Summary
Functions
Compile a project and collect compiler traces for later analysis
Returns module insights
Loads tracex manifest file from disk
Link to this section Functions
compile_project(opts \\ [])
View Sourcecompile_project(list()) :: {Tracex.Project.t(), [Tracex.Trace.t()]}
Compile a project and collect compiler traces for later analysis
Project's metadata is built along the way and written to disk together with collected traces in manifest file. This enables the developer to load it into iex console and play with it.
Options
manifest_path
- path to manifest file, defaults to_build/{Mix.env}/lib/tracex/.mix/tracex
custom_classifiers
- list of project-specific classifier modules
insights(traces, module)
View Sourceinsights([Tracex.Trace.t()], atom() | [atom()]) :: map()
Returns module insights
See Tracex.Insights
for more information.
load_from_manifest(path \\ manifest_path())
View Sourceload_from_manifest(binary()) :: {Tracex.Project.t(), [Tracex.Trace.t()]}
Loads tracex manifest file from disk