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

No method Profile.init() #7365

Closed
jiahao opened this issue Jun 22, 2014 · 3 comments
Closed

No method Profile.init() #7365

jiahao opened this issue Jun 22, 2014 · 3 comments

Comments

@jiahao
Copy link
Member

jiahao commented Jun 22, 2014

Long profiling runs may produce the warning

WARNING: The profile data buffer is full; profiling probably terminated
before your program finished. To profile for longer runs, call Profile.init()
with a larger buffer and/or larger delay.

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 for Profile.__init__()), so the warning should tell users to run the two-argument method Profile.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

@GunnarFarneback
Copy link
Contributor

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.

@ivarne
Copy link
Member

ivarne commented Jun 24, 2014

cc: @timholy

@timholy
Copy link
Member

timholy commented Jun 24, 2014

All good points. I'd have no objections to such changes. I'll tackle them soonish if no one beats me to it.

timholy added a commit that referenced this issue Jun 30, 2014
Make Profile.init more flexible (fix #7365)
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

4 participants