summaryrefslogtreecommitdiff
path: root/testing/tests/perf
diff options
context:
space:
mode:
Diffstat (limited to 'testing/tests/perf')
-rw-r--r--testing/tests/perf/test_crypto.py14
-rw-r--r--testing/tests/perf/test_sqlcipher.py12
-rw-r--r--testing/tests/perf/test_sync.py12
3 files changed, 19 insertions, 19 deletions
diff --git a/testing/tests/perf/test_crypto.py b/testing/tests/perf/test_crypto.py
index 9ce418ba..367c3b5b 100644
--- a/testing/tests/perf/test_crypto.py
+++ b/testing/tests/perf/test_crypto.py
@@ -5,7 +5,7 @@ SIZE_LIMT environment variable.
For instance, to keep the maximum payload at 1MB:
-SIZE_LIMIT=1E6 py.test -s tests/perf/test_crypto.py
+SIZE_LIMIT=1E6 py.test -s tests/perf/test_crypto.py
"""
import pytest
import os
@@ -45,7 +45,7 @@ def create_doc_decryption(size):
doc = SoledadDocument(
doc_id=uuid4().hex, rev='rev',
json=json.dumps(DOC_CONTENT))
-
+
encrypted_doc = yield crypto.encrypt_doc(doc)
doc.set_json(encrypted_doc)
@@ -74,16 +74,16 @@ def create_raw_decryption(size):
# plugin.
encryption_tests = [
- ('10k', 1E4),
+ ('10k', 1E4),
('100k', 1E5),
('500k', 5E5),
- ('1M', 1E6),
- ('10M', 1E7),
- ('50M', 5E7),
+ ('1M', 1E6),
+ ('10M', 1E7),
+ ('50M', 5E7),
]
for name, size in encryption_tests:
- if size < LIMIT:
+ if size < LIMIT:
sz = int(size)
globals()['test_encrypt_doc_' + name] = create_doc_encryption(sz)
globals()['test_decrypt_doc_' + name] = create_doc_decryption(sz)
diff --git a/testing/tests/perf/test_sqlcipher.py b/testing/tests/perf/test_sqlcipher.py
index e7a54228..39c9e3ad 100644
--- a/testing/tests/perf/test_sqlcipher.py
+++ b/testing/tests/perf/test_sqlcipher.py
@@ -29,10 +29,10 @@ def build_test_sqlcipher_create(amount, size):
return test
-test_async_create_20_500k = build_test_sqlcipher_async_create(20, 500*1000)
-test_async_create_100_100k = build_test_sqlcipher_async_create(100, 100*1000)
-test_async_create_1000_10k = build_test_sqlcipher_async_create(1000, 10*1000)
+test_async_create_20_500k = build_test_sqlcipher_async_create(20, 500 * 1000)
+test_async_create_100_100k = build_test_sqlcipher_async_create(100, 100 * 1000)
+test_async_create_1000_10k = build_test_sqlcipher_async_create(1000, 10 * 1000)
# synchronous
-test_create_20_500k = build_test_sqlcipher_create(20, 500*1000)
-test_create_100_100k = build_test_sqlcipher_create(100, 100*1000)
-test_create_1000_10k = build_test_sqlcipher_create(1000, 10*1000)
+test_create_20_500k = build_test_sqlcipher_create(20, 500 * 1000)
+test_create_100_100k = build_test_sqlcipher_create(100, 100 * 1000)
+test_create_1000_10k = build_test_sqlcipher_create(1000, 10 * 1000)
diff --git a/testing/tests/perf/test_sync.py b/testing/tests/perf/test_sync.py
index 7b3c4bf0..1bf6cc21 100644
--- a/testing/tests/perf/test_sync.py
+++ b/testing/tests/perf/test_sync.py
@@ -21,9 +21,9 @@ def create_upload(uploads, size):
return test
-test_upload_20_500k = create_upload(20, 500*1000)
-test_upload_100_100k = create_upload(100, 100*1000)
-test_upload_1000_10k = create_upload(1000, 10*1000)
+test_upload_20_500k = create_upload(20, 500 * 1000)
+test_upload_100_100k = create_upload(100, 100 * 1000)
+test_upload_1000_10k = create_upload(1000, 10 * 1000)
def create_download(downloads, size):
@@ -46,9 +46,9 @@ def create_download(downloads, size):
return test
-test_download_20_500k = create_download(20, 500*1000)
-test_download_100_100k = create_download(100, 100*1000)
-test_download_1000_10k = create_download(1000, 10*1000)
+test_download_20_500k = create_download(20, 500 * 1000)
+test_download_100_100k = create_download(100, 100 * 1000)
+test_download_1000_10k = create_download(1000, 10 * 1000)
@pytest.inlineCallbacks