-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Pass --timeout flag to pyperf #354
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pyperf main process does basically nothing, it just waits until worker processes complete. It may be safer to implement the timeout in pyperf, to kill both processes, the main one and the current worker process.
If you implement the timeout in pyperformance, you only see the main process and you cannot (easily) kill the worker process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may have sent you forth with bad information by suggesting that this would be easier in pyperformance
, and maybe @vstinner is right that this would be better handled in pyperf
.
We'd still need a patch to pyperformance
to pass the --timeout
value down to pyperf -- 80% of this PR is handling commandline arguments as it is, so not wasted effort.
Don't worry, that's the purpose of the review. I leave this PR open for now and implement the timeout in pyperf. Once that one is in, I'll fix this up to make use of the timeout. |
I've addressed feedbacks on this PR and also raised a new one in pyperf: psf/pyperf#205 |
You need a pyperf release first. |
I started one here |
Your PR should update pyperf to 2.8. |
I see that pyperf is unpinned so in theory I should not change anything in there. I have done a fresh install of pyperformance and in fact it installs pyperf 2.8 |
I think you still need to update it here, which is the version that will actually run in the venvs. |
Yes, you are right. I've just found it! :) |
I'm currently running the tests because there is a small change in the way pyperf reports unit measure: psf/pyperf@432c419 |
Update test_commands to reflect a change how pyperf reports data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Add the
--timeout
flag to therun
command. By default there is no timeout and user needs to specify it if they want it. I wanted to avoid to change the current behaviour.This addressed the issue #353
If you run the below command passing the timeout of 1 second, dask will fail and it will be reported at the end.