Details
-
Type:
Technical task
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Story Points:2
-
Sprint:AP S22-6 (May)
-
Team:Alert Production
Description
Eric Bellm suggested using pyinstrument to get profiling information that does not have the timing decorators causing confusing call graphs. It looks like there are quite a few other statistical profilers available (e.g. this stack overflow discussion), so if pyinstrument doesn't work, we could try another one.
A possible output of this ticket would be a new section added to the dev guide python profiling section. Speaking of which, that could probably use a paragraph on snakeviz, and some updated notes on gprof2dot: there's a single sentence, and a reference to another tool (runsnakerun) that was last updated in 2011...
I was able to run pyinstrument, and played around with some of its options. Some comments:
DM-34881, but withDM-34881(timer disabled) the standard profiler works fine, I think. I've attached a speedscope flamegraph: mouseover gives more info about each box, but I don't know that we'll learn much more from this, compared with the normal profiler.So, I think my preference is to just run with the timer disabled via my
DM-34881hack, since it cleans up the call graph in a way that we'd want anyway.It might be worth adding a couple of sentences to the dev guide section about profilers about it, so others can be aware of the option?