Traceur.jl
Performance linting for Julia.
Normal Use
Traceur.@trace — Macro@trace(functioncall(args...), maxdepth=2, modules=[])Analyse functioncall(args...) for common performance problems and print them to the terminal.
Optional arguments:
maxdepthconstrols how far Traceur recurses through the call stack.- If
modulesis nonempty, only warnings for methods defined in one of the modules specified will be printed.
Traceur.warnings — Functionwarnings(f; kwargs...)::Vector{Traceur.Warnings}Collect all warnings generated by Traceur's analysis of the execution of the no-arg function f and return them.
Possible keyword arguments:
maxdepth=typemax(Int)constrols how far Traceur recurses through the call stack.- If
modulesis nonempty, only warnings for methods defined in one of the modules specified will be printed.
Tests
Traceur.@check — Macro@check fun(args...) nowarn=[] except=[] maxdepth=typemax(Int)Run Traceur on fun, and throw an error if any warnings occur inside functions tagged with @should_not_warn or specified in nowarn.
To throw an error if any warnings occur inside any functions, set nowarn=:all.
To throw an error if any warnings occur inside any functions EXCEPT for a certain set of functions, list the exceptions in the except variable, for example except=[g,h]
Traceur.check — Functioncheck(f::Function; nowarn=[], except=[], kwargs...)Run Traceur on f, and throw an error if any warnings occur inside functions tagged with @should_not_warn or specified in nowarn.
To throw an error if any warnings occur inside any functions, set nowarn=:all.
To throw an error if any warnings occur inside any functions EXCEPT for a certain set of functions, list the exceptions in the except variable, for example except=[g,h]
Traceur.@should_not_warn — Macro@should_not_warn function foo(x)
...
endAdd foo to the list of functions in which no warnings may occur (checkd by @check).