Profiler showing path dependency?

Chengcheng Xiang xiangchnchn at gmail.com
Thu Mar 26 12:06:43 EDT 2020


Hi,

Our tool can help with this: https://github.com/devopspp/pyliveupdate/blob/master/README.md#profiler. It can output a flamegraph and a per-path call summary. Feel free to check it out and let me know if there is any questions.

-CC

On Friday, March 13, 2020 at 4:52:51 PM UTC-7, Go Luhng wrote:
> Consider a simple call graph: `main()` calls `foo()`, which calls
> `bar()`. Then `main()` calls `qux()` which also calls `bar()`, but
> with different parameters.
> 
> When you run the above through cProfile and view the result in
> SnakeViz, you will see `main()` calling `foo()` and `qux()`, with each
> of them calling `bar()`. However, if you hover or click on `bar()`,
> you will see the global aggregate statistics for it. For example, the
> number of times it has been called, and their total time cost.
> 
> Is there a way to get a path-dependent profiler breakdown for `bar()`?
>  Specifically for this example, statistics for when it is called by
> `foo()`, and separately statistics for when it is called by `qux()`.


More information about the Python-list mailing list