Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Python profiling tools #1

Open
dtch1997 opened this issue Apr 25, 2024 · 0 comments
Open

Add Python profiling tools #1

dtch1997 opened this issue Apr 25, 2024 · 0 comments

Comments

@dtch1997
Copy link
Collaborator

Comments:

  • As well as pyinstrument (which does sample based profiling so doesn't record all stack frames only a sample) there is the built in cProfile module (https://docs.python.org/3/library/profile.html) which deterministically profiles all function calls - this gives more complete coverage but at a higher overhead (and the overhead in some cases may make the profiling timings non-representative of the non-profiled code). If you go with cProfile then snakeviz (https://jiffyclub.github.io/snakeviz/) is often a nicer way to visualize the profiling output than the default tabular output

Resources:

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant