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

Add the ability to turn on/off stats, dump them and clear them, when built with --enable-pystats #93841

Open
markshannon opened this issue Jun 15, 2022 · 1 comment
Labels
type-feature

Comments

@markshannon
Copy link
Member

@markshannon markshannon commented Jun 15, 2022

This would only apply with --enable-pystats and thus #define Py_STATS. For normal builds nothing would change.

Add sys._stats_on(), sys._stats_off(), sys._stats_clear() and sys._stats_dump() functions.
This would allow us to record and dump stats for parts of a program.

This would be useful for experimentation and having stats match timings for pyperf, as we could turn on stats when starting the timer, and turn them off when stopping the timer.

@markshannon markshannon added the type-feature label Jun 15, 2022
@markshannon
Copy link
Member Author

@markshannon markshannon commented Jun 15, 2022

#93843

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

No branches or pull requests

1 participant