I wanted to build a wrapper to use @timeit_debug quickly like
function with_timer(f::Function, modules::Vector{Module})
reset_timer!(timer)
try
for mod in modules
enable_debug_timings(mod)
end
f()
finally
print_timer(timer)
for mod in modules
disable_debug_timings(mod)
end
end
end
However I realized that doing so creates method version issues (this is printed just before calling f()):
invokelatest(Main.timeit_debug_enabled) = true
Main.timeit_debug_enabled() = false
Would that makes sense to use invokelatest here? Or is there a better solution to my problem?
I wanted to build a wrapper to use
@timeit_debugquickly likeHowever I realized that doing so creates method version issues (this is printed just before calling
f()):Would that makes sense to use
invokelatesthere? Or is there a better solution to my problem?