summaryrefslogtreecommitdiff
path: root/testing/tests
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2017-03-02 15:47:04 -0300
committerVictor Shyba <victor1984@riseup.net>2017-03-02 18:54:32 -0300
commit32c6d2eae998ceec302995e52c70a0636ca1e463 (patch)
tree8370d758a9306f4db42234a89acaaed2fc4d7bf8 /testing/tests
parent32c950d16e7bea55bb7af3f4650af857be9027e0 (diff)
[test] add comments explaining behaviour of upload/download benchmark
Diffstat (limited to 'testing/tests')
-rw-r--r--testing/tests/benchmarks/test_sync.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/testing/tests/benchmarks/test_sync.py b/testing/tests/benchmarks/test_sync.py
index ee2e2960..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")