-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
No method Profile.init() #7365
Comments
I've never been comfortable with the Profile.init function, especially that there's no obvious way to remember the order of the arguments. Maybe the no-argument call should report back current settings (and usage instructions?), whereas changing the settings should be done with keyword arguments. |
cc: @timholy |
All good points. I'd have no objections to such changes. I'll tackle them soonish if no one beats me to it. |
Make Profile.init more flexible (fix #7365)
Long profiling runs may produce the warning
However, the message is ambiguous and could be more helpful. There is no zero-argument method for
Profile.init()
(although there is a zero-argument method forProfile.__init__()
), so the warning should tell users to run the two-argument methodProfile.init(n, delay)
. However, since the warning does not print what the buffer size and delays were used in the run that triggered the message, this isn't very informative either.cc: @Keno
The text was updated successfully, but these errors were encountered: