Skip to content
Snippets Groups Projects
Commit 32c6d2ea authored by drebs's avatar drebs Committed by Victor
Browse files

[test] add comments explaining behaviour of upload/download benchmark

parent 32c950d1
Branches
Tags
No related merge requests found
...@@ -11,6 +11,12 @@ def load_up(client, amount, payload): ...@@ -11,6 +11,12 @@ def load_up(client, amount, payload):
yield gatherResults(deferreds) 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): def create_upload(uploads, size):
@pytest.inlineCallbacks @pytest.inlineCallbacks
@pytest.mark.benchmark(group="test_upload") @pytest.mark.benchmark(group="test_upload")
...@@ -29,6 +35,14 @@ test_upload_100_100k = create_upload(100, 100 * 1000) ...@@ -29,6 +35,14 @@ test_upload_100_100k = create_upload(100, 100 * 1000)
test_upload_1000_10k = create_upload(1000, 10 * 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): def create_download(downloads, size):
@pytest.inlineCallbacks @pytest.inlineCallbacks
@pytest.mark.benchmark(group="test_download") @pytest.mark.benchmark(group="test_download")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment