Let's say I have a low level function f
which I call a LOT of times. I'm testing another high level function g
which calls f
MANY times. I normally profile g
using @profview
in VSCode. What if I'd like to:
g
f
inside the call to g
, profile it, show the result ONLY FOR f
in VSCode profiler view and stop (a readline()
is ok) so i can take notesg
and stop (and do the same thing) the next time it calls f
Any way of doing this "interactive" profiling ?
I'm not familiar with vscode, but my understanding is that it has a built-in debugger. What's preventing you from doing profiling from inside the debugger (so long as you run the pieces you're interested in profiling in compiled rather than interpreted mode)?
Last updated: Nov 06 2024 at 04:40 UTC