PerfTest.jl translates a declarative recipe file for performance tests into a Julia expression that can actually execute them. The traslation prodedure is done by walking through the recipe code whilst trying to do pattern matching with a set of translation rules. The translation rules are totally ordered, which means that there is a clear hierarchy on which pattern is translated in case an expression fits two patterns at the same time. Below there is a full list of the rules, in decreasing order by priority. Given the way the macros in the package are declared there should not be ambiguous pattern matching but for further safety the priority is enforced.
Inside a @perftest macro the expression has to be manipulated to be able tu use local variables in a global context (a requirement of BenchmarkTools.jl). The rules have the following priority: