-
Notifications
You must be signed in to change notification settings - Fork 84
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
Fix Stress Tests #4406
Fix Stress Tests #4406
Conversation
…rather than matster
…ight be goign wrong
I should note that stress tests are now finishing in around 4 hours as they were previously and there were no SQL deadlock errors that I saw. Once this PR is in, therefore, we should finally be able to deploy again! |
@@ -38,34 +46,38 @@ class TestFile: | |||
|
|||
def __init__(self, file_name, size_mb=1, content=None): | |||
self._file_name = file_name | |||
self._file_path = temp_path(file_name) |
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 should note this oddity: suddenly, when running stress tests, I started getting an Errno 13 Permission Denied
error when the stress tests would try to create a file. To get around this, instead of creating the file in the working directory, I create it /tmp/ and then update the rest of the code accordingly.
Not sure why this issue just started popping up, though.
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.
Looks great!
""" | ||
User used some time. | ||
Increment disk_used for user by amount. | ||
When incrementing values, we have to use a special query to ensure that we avoid |
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.
can we shorten this docstring? probably a bit too much detail for posterity
codalab/model/worker_model.py
Outdated
time.sleep( | ||
0.3 | ||
0.1 | ||
) # changed from 0.003 to keep from rate-limiting due to dead workers |
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.
) # changed from 0.003 to keep from rate-limiting due to dead workers | |
) |
scripts/test_util.py
Outdated
@@ -179,3 +181,48 @@ def cleanup(cl, tag, should_wait=True): | |||
run_command([cl, 'wrm', uuid, '--force']) | |||
worksheets_removed += 1 | |||
print('Removed {} bundles and {} worksheets.'.format(bundles_removed, worksheets_removed)) | |||
|
|||
|
|||
class timer: |
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.
uppercase?
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.
Looks great!
@@ -393,6 +391,7 @@ def main(): | |||
runner.run() | |||
duration_seconds = time.time() - start_time | |||
print("--- Completion Time: {} minutes---".format(duration_seconds / 60)) | |||
print(json.dumps(runner._runs)) |
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.
let's print this before we print completion time.
This addresses: #4404
This PR does several things to alleviate issues brought to light by stress tests: