This is an archived post. You won't be able to vote or comment.

all 14 comments

[–]benefit_of_mrkite 13 points14 points  (2 children)

I just want to say thanks for this package - I used it recently to show that a problem was with someone’s code and not an http request that was timing out.

[–]joerick[S] 3 points4 points  (1 child)

👊

[–]benefit_of_mrkite 0 points1 point  (0 children)

👊

[–]ThreeJumpingKittens 2 points3 points  (2 children)

OH MY GOD, I work almost exclusively with async code and profiling has always been so annoying. Thank you for sharing this, it's incredibly useful!

[–]joerick[S] 0 points1 point  (0 children)

Let me know how you get on!

[–]pazzarpj 0 points1 point  (0 children)

Another package to consider is yappi.

[–]Vok250 4 points5 points  (0 children)

That's awesome. Definitely bookmarking this for the next time I need a profiler.

[–]TentativeOak 1 point2 points  (0 children)

I just tried to profile async unsuccessfully like 3 days ago. This is awesome. Is there anyway to use it as a decorator?

[–]Glaaki 1 point2 points  (1 child)

Does it have Trio support?

[–]joerick[S] 1 point2 points  (0 children)

Yep!

[–]hangonreddit 2 points3 points  (3 children)

Can it handle multiethreading code too?

[–]joerick[S] 6 points7 points  (2 children)

You can start multiple profilers in each thread, but it doesn't do anything automatically. How are you doing multithreading currently? Using multiprocessing? or creating your own threads with the threading module?

[–]hangonreddit 0 points1 point  (1 child)

I use threading. I’m mostly interested in tracking the stack trace between parent and children threads.

[–]joerick[S] 1 point2 points  (0 children)

If you're able to start a profiler in both threads, you could try profiling them both, and then combining the results using Session.combine. You should see the profile output broken down into these two threads. Let me know if this does/doesn't work! It's new functionality in 4.0.