From the doc of the TimerOutputs.jl, it is not clear how to use it for timing a function and its internal function calls in my developing packages. Normally, I will create a new environment outside of my package and write a script, such as
using TimerOutputs
using MyPackage
const to = TimerOutput()
@timeit to "myfunc" MyPackage.myfunc()
However, this code can only report the time cost by myfunc
. I also want to time all internal function calls inside myfunc
. How can I do that? Shall I pass to
as an argument for myfunc
. Even worse, this approach will also introduce an extra dependency of TimerOutputs to MyPackage. Is there any less obtrusive way to do so?