Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

option for CPU time #225

Open
belm0 opened this issue Nov 30, 2022 · 0 comments
Open

option for CPU time #225

belm0 opened this issue Nov 30, 2022 · 0 comments

Comments

@belm0
Copy link

belm0 commented Nov 30, 2022

Pyinstrument records duration using ‘wall-clock’ time. When you’re writing a program that downloads data, reads files, and talks to databases, all that time is included in the tracked time by pyinstrument.

That’s really important when debugging performance problems, since Python is often used as a ‘glue’ language between other services.

In the other 50% of python programs out there, CPU efficiency is important. Sure, for a synchronous Python program, CPU and wall time are basically the same, and pyinstrument can be used to find the places consuming CPU.

However, for async programs, since pyinstrument only offers wall time, it cannot be used to find what code is consuming CPU. For this use case, attributing time to sleep() or network blocking is unwanted.

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

No branches or pull requests

1 participant