diff options
author | drebs <drebs@leap.se> | 2017-03-11 14:38:51 +0100 |
---|---|---|
committer | drebs <drebs@leap.se> | 2017-03-11 14:38:51 +0100 |
commit | 3ec21a7a6b39b4fe8885f3050ab75402e6812a1f (patch) | |
tree | 300a2d8da67bbc7c6484f9ee136a4a18c41c48c6 /testing/tests/benchmarks/test_sync.py | |
parent | c379a58d84fbf061b8d046057e45089f0e3c65f6 (diff) | |
parent | 3eefcb7d138ef41932a748ae729bfa0b629758d2 (diff) |
Merge tag '0.9.3' into debian/platform-0.9
0.9.3
Conflicts:
server/pkg/soledad-server
server/pkg/soledad-server.service
Diffstat (limited to 'testing/tests/benchmarks/test_sync.py')
-rw-r--r-- | testing/tests/benchmarks/test_sync.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/testing/tests/benchmarks/test_sync.py b/testing/tests/benchmarks/test_sync.py index 1501d74b..fcfab998 100644 --- a/testing/tests/benchmarks/test_sync.py +++ b/testing/tests/benchmarks/test_sync.py @@ -11,6 +11,12 @@ def load_up(client, amount, payload): yield gatherResults(deferreds) +# Each test created with this function will: +# +# - get a fresh client. +# - iterate: +# - setup: create N docs of a certain size +# - benchmark: sync() -- uploads N docs. def create_upload(uploads, size): @pytest.inlineCallbacks @pytest.mark.benchmark(group="test_upload") @@ -29,6 +35,14 @@ test_upload_100_100k = create_upload(100, 100 * 1000) test_upload_1000_10k = create_upload(1000, 10 * 1000) +# Each test created with this function will: +# +# - get a fresh client. +# - create N docs of a certain size +# - sync (uploads those docs) +# - iterate: +# - setup: get a fresh client with empty local db +# - benchmark: sync() -- downloads N docs. def create_download(downloads, size): @pytest.inlineCallbacks @pytest.mark.benchmark(group="test_download") @@ -41,7 +55,7 @@ def create_download(downloads, size): # ensures we are dealing with properly encrypted docs def setup(): - return soledad_client() + return soledad_client(force_fresh_db=True) def sync(clean_client): return clean_client.sync() |