3 ms·
How does this compare to snakeviz?
by actinium226 3y ago
How does this compare to snakeviz?
- formerly_proven 3y agosnakeviz, tuna, pyprof2calltree etc. use data collected by cProfile which is probably the most flawed profiler anyone has been shipping for a long time, because cProfile only records the caller instead of the stack. Strangely enough the documentation for cProfile has an entire "Limitations" section which does not mention this. Recording only callers instead of stacks means you literally cannot distinguish different control flows going through a common function at some point. All tools, like the mentioned ones, which pretend to reconstruct a flame graph or similar visualization don't actually work. A common cause for degenerate cases are function decorators used by multiple functions, especially if the decorator appears multiple times on the stack. So for many practical programs the output of these is simply wrong and misleading.