py-spy, one of the tools I miss most when working in other languages

https://github.com/benfred/py-spy

16 points · 3 comments · view on lemmy.world

3 Comments

jengland@toast.ooo · 2 pts · 3y (1 reply)

I'm curious what features are hard to find in the debuggers for other languages?

Buttons@programming.dev · 2 pts · 3y

Well, with py-spy I can attach to any Python process and see which line in the source code is using the most time. I can see this updated in real-time. All this is easily done without giving any thought to profiling while writing the code.

Surely the same cannot be said of C. For example, how would I see which line of ls is taking the most time? I'm guessing it will take more than the two lines it took to setup and use py-spy (brew install py-spy, py-spy top pid).

Sigmatics@lemmy.ca · 2 pts · 3y

Thanks, this is helpful!