tracing_helper v0.0.2 TH
Basic tracing helper
Summary
Functions
Turn on flat tracing on all functions of given module
Turn on flat tracing on given module and given function
Turn on nested tracing on all functions of given module
Turn on nested tracing on given function of given module
Turn off tracing on all functions of given module
Turn off tracing on given function of given module
Functions
Specs
trace_flat(module) :: {:ok, pid}
Turn on flat tracing on all functions of given module.
It configures tracing modules to trace all functions of given module in flat way (without indenting recursion calls).
Examples
iex(1)> TH.trace_flat Float
{:ok, [{:matched, :nonode@nohost, 19}, {:saved, 1}]}
iex(2)> Float.floor 1.1
#PID<0.125.0> call: Float.__info__(:macros) level: 0
#PID<0.125.0> rtrn: [] level: 0
#PID<0.125.0> call: Float.floor(1.1) level: 0
#PID<0.125.0> call: Float.floor(1.1, 0) level: 1
#PID<0.125.0> call: Float.power_of_10(0) level: 2
#PID<0.125.0> rtrn: 1 level: 2
#PID<0.125.0> rtrn: 1.0 level: 1
#PID<0.125.0> rtrn: 1.0 level: 0
1.0
Specs
trace_flat(module, atom) :: {:ok, pid}
Turn on flat tracing on given module and given function.
It configures tracing modules to trace given function of given module in flat way (without indenting recursion calls).
Examples
iex(1)> TH.trace_flat Float, :floor
{:ok, #PID<0.139.0>}
iex(2)> Float.floor 1.1
#PID<0.125.0> call: Float.floor(1.1) level: 0
#PID<0.125.0> call: Float.floor(1.1, 0) level: 1
#PID<0.125.0> rtrn: 1.0 level: 1
#PID<0.125.0> rtrn: 1.0 level: 0
1.0
Specs
trace_nested(module) :: {:ok, pid}
Turn on nested tracing on all functions of given module.
It configures tracing modules to trace all functions of given module in flat way (with indenting recursion calls).
Examples
iex(1)> TH.trace_nested Float
{:ok, #PID<0.139.0>}
iex(2)> Float.floor 1.1
#PID<0.138.0> Float.__info__(:macros)
#PID<0.138.0> []
#PID<0.138.0> Float.floor(1.1)
#PID<0.138.0> | Float.floor(1.1, 0)
#PID<0.138.0> | | Float.power_of_10(0)
#PID<0.138.0> | | 1
#PID<0.138.0> | 1.0
#PID<0.138.0> 1.0
1.0
Specs
trace_nested(module, atom) :: {:ok, pid}
Turn on nested tracing on given function of given module.
It configures tracing modules to trace given functions of given module in flat way (with indenting recursion calls).
Examples
iex(1)> TH.trace_nested Float, :floor
{:ok, #PID<0.139.0>}
iex(2)> Float.floor 1.1
#PID<0.138.0> Float.floor(1.1)
#PID<0.138.0> | Float.floor(1.1, 0)
#PID<0.138.0> | 1.0
#PID<0.138.0> 1.0
1.0
Specs
untrace(module) :: {:ok, [tuple]}
Turn off tracing on all functions of given module.
Examples
iex(1)> TH.untrace Float
{:ok, #PID<0.139.0>}
iex(2)> Float.floor 1.1
1.0