run_part3_tests module¶
Autograder tests for Part 3.
Run this script (python3 run_part3_tests.py) from the same directory as
your client.py file. This will run all of the functionality and performance
tests for Part 3 of the project.
-
class
run_part3_tests.PerfServer¶ Bases:
servers.StorageServer-
delete(k)¶
-
get(k)¶
-
put(k, v)¶
-
size= 0¶
-
-
class
run_part3_tests.StudentTester(theclass)¶ Bases:
object-
run_test(t, Server=<class 'servers.StorageServer'>, Crypto=<class 'crypto.Crypto'>, Pks=<class 'servers.PublicKeyServer'>)¶
-
-
run_part3_tests.f(C, pks, crypto, server=<class 'run_part3_tests.PerfServer'>, size=1048576, other=False)¶ Store a 1MB file on the server and make updates of increasingly larger sizes and count total bytes sent.
-
run_part3_tests.run_part3_tests()¶ Runs all part 3 functionality tests.
-
run_part3_tests.t01_StoreManyKeys(C, pks, crypto, server)¶ Verify that it is reasonably efficient to store many keys on the server.
-
run_part3_tests.t02_OverwritePuts(C, pks, crypto, server)¶ A long file when changed byte by byte will have the correct result at the end.
-
run_part3_tests.t03_MoreOverwritePuts(C, pks, crypto, server)¶ A long file when changed many bytes at a time, will have the correct result at the end.
-
run_part3_tests.t04_LengthChangingPuts(C, pks, crypto, server)¶ Verifies that it is possible to change the length of a file once on the server.
-
run_part3_tests.t05_SmallLengthChangingPuts(C, pks, crypto, server)¶ Randomly adds or deletes a small number of bytes from a file, and ensures data is correct.
-
run_part3_tests.t06_PutOffByOneSize(C, pks, crypto, server)¶ Uploads a file with only a few bytes different by changing its length.
-
run_part3_tests.z01_SimplePerformanceTest(C, pks, crypto, server=<class 'run_part3_tests.PerfServer'>, size=1048576, other=False)¶ The simplest performance test: put a 1MB value on the server, and update a single byte in the middle. Count number of bytes changed.
-
run_part3_tests.z02_SimpleAlgorithmicPerformanceTest(C, pks, crypto, server=<class 'run_part3_tests.PerfServer'>)¶ Try to compute the order-of-complexity of the algorithm being used when updating a single byte. Let n be the size of the initial value stored. In the worst case, an O(n) algorithm re-updates every byte. An O(1) algorithm updates only a constant number of bytes.
-
run_part3_tests.z03_SharingPerformanceTest(C, pks, crypto, server=<class 'run_part3_tests.PerfServer'>, size=1048576)¶ Store a 1MB file on the server, and share it with another user. Alternate each user modifying it and count total bytes transferred.
-
run_part3_tests.z04_NonSingleSharingPerformanceTest(C, pks, crypto, server=<class 'run_part3_tests.PerfServer'>, size=1048576, other=False)¶ Store a 1MB file on the server and make updates of increasingly larger sizes and count total bytes sent.