gaogaotiantian / viztracer

VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code execution.
https://viztracer.readthedocs.io/
Apache License 2.0
4.64k stars 355 forks source link

VizTracer not tracing some functions #439

Open arbenede opened 1 month ago

arbenede commented 1 month ago

I am using @log_sparse(stack_depth=8) to trace a couple of functions (say fun1(), fun2()) however only some of the functions called by fun1() and fun2() are traced. I am using

tracer = VizTracer(log_sparse=True)
    tracer.start()
    fun1()
    fun2()
    tracer.stop()

Is there a way to force VizTracer log all the functions called up to the specified stack_depth?

gaogaotiantian commented 1 month ago

Can you provide a minimum reproducible example? What's your code and why you think it did not work properly? There's not much information in the description so I don't know where to look.