summaryrefslogtreecommitdiff
path: root/testing/tests/benchmarks
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2016-11-26 18:09:26 -0300
committerVictor Shyba <victor1984@riseup.net>2016-11-28 13:47:30 -0300
commit7006b88db2a5f6bca5b401800d8e14821371216a (patch)
tree7b29dab036032699fea46bb17a0a0fb1fa5fac71 /testing/tests/benchmarks
parent93815e28de5c8b1968cd9d3cf59800c9023983cf (diff)
[feature] make _crypto stream on decryption
We are already doing this on encryption, now we can stream also from decryption. This unblocks the reactor and will be valuable for blobs-io.
Diffstat (limited to 'testing/tests/benchmarks')
-rw-r--r--testing/tests/benchmarks/test_crypto.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/testing/tests/benchmarks/test_crypto.py b/testing/tests/benchmarks/test_crypto.py
index 75ad9a30..8ee9b899 100644
--- a/testing/tests/benchmarks/test_crypto.py
+++ b/testing/tests/benchmarks/test_crypto.py
@@ -39,7 +39,7 @@ def create_doc_encryption(size):
def create_doc_decryption(size):
@pytest.inlineCallbacks
@pytest.mark.benchmark(group="test_crypto_decrypt_doc")
- def test_doc_decryption(soledad_client, benchmark, payload):
+ def test_doc_decryption(soledad_client, txbenchmark, payload):
crypto = soledad_client()._crypto
DOC_CONTENT = {'payload': payload(size)}
@@ -50,7 +50,7 @@ def create_doc_decryption(size):
encrypted_doc = yield crypto.encrypt_doc(doc)
doc.set_json(encrypted_doc)
- benchmark(crypto.decrypt_doc, doc)
+ yield txbenchmark(crypto.decrypt_doc, doc)
return test_doc_decryption