You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def create_disk_load(file_path="temp_file.txt", file_size_mb=50000):
for _ in range:
while 0 <= TEST_DURATION:
file_size_bytes = file_size_mb * 1024 * 1024
data = os.urandom(file_size_bytes)
#Create File and Writes/Reads its contents
try:
with open(file_path, "wb") as f:
f.write(data)
with open(file_path, "rb") as f:
f.read()
#Remove File afterwards
finally:
try:
os.remove(file_path)
except FileNotFoundError:
# Ignore if the file doesn't exist
pass
if __name__ == "__main__":
create_disk_load()
Now that test_onroad is reliable, it's time to add some things to really stress the system:
The text was updated successfully, but these errors were encountered: