what-studio / profiling

Was an interactive continuous Python profiler.
BSD 3-Clause "New" or "Revised" License
2.97k stars 113 forks source link

feat: adds a --watch flag to only showing stats that contain a specific statement #52

Open bernardotorres opened 5 years ago

bernardotorres commented 5 years ago

My personal use case was that I was profiling a service. The main thread would be reading from Kombu all the time, so the interface was mostly showing operations from the main thread and not from the request threads, which were the ones I was interested in.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.5%) to 56.52% when pulling 8763a5d11c4ebd06b5a90bdced0a01aaadf02687 on bernardotorres:master into f1491195c553caddbf7afb7ad92b52e82db13b67 on what-studio:master.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.5%) to 56.52% when pulling 8763a5d11c4ebd06b5a90bdced0a01aaadf02687 on bernardotorres:master into f1491195c553caddbf7afb7ad92b52e82db13b67 on what-studio:master.

sublee commented 5 years ago

Thanks for sending a great feature.

But I worry about a performance at is_watched which checks the give statistics recursively. This function would be called for every live statistics update into a viewer. I guess that when we use the live profiling for a complex program, the delay of is_watched could indicate some perceivable UI lag.

Can we find a better approach?