summaryrefslogtreecommitdiff
path: root/scripts/profiling/mail/mx.py
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2015-11-12 18:57:33 +0100
committerRuben Pollan <meskio@sindominio.net>2015-11-12 18:57:33 +0100
commit3aea1652d82755affdcf4c734f9f0ba004482046 (patch)
tree75c8344b6f7f9e168d7d8e72d0a1a87b2f09b4ad /scripts/profiling/mail/mx.py
parent36f476c53f6f3532652d7428e306dcef1c37f879 (diff)
parent0cf6f3efd3cc7dd3361277a8f05577e823e361e5 (diff)
Merge branch 'refactor/isolated_couchdb_code' into develop
- Releases: 0.8.0
Diffstat (limited to 'scripts/profiling/mail/mx.py')
-rw-r--r--scripts/profiling/mail/mx.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/profiling/mail/mx.py b/scripts/profiling/mail/mx.py
index b6a1e5cf..55084a40 100644
--- a/scripts/profiling/mail/mx.py
+++ b/scripts/profiling/mail/mx.py
@@ -5,7 +5,7 @@ import timeit
from leap.keymanager import openpgp
-from leap.soledad.common.couch import CouchDocument
+from leap.soledad.common.document import ServerDocument
from leap.soledad.common.crypto import (
EncryptionSchemes,
ENC_JSON_KEY,
@@ -47,7 +47,7 @@ def get_enc_json(pubkey, message):
def get_new_doc(enc_json):
- doc = CouchDocument(doc_id=str(uuid.uuid4()))
+ doc = ServerDocument(doc_id=str(uuid.uuid4()))
doc.content = {
'incoming': True,
ENC_SCHEME_KEY: EncryptionSchemes.PUBKEY,
@@ -71,6 +71,7 @@ def put_lots_of_messages(db, number):
log("Populating database with %d encrypted messages... "
% number, line_break=False)
pubkey = get_pubkey()
+
def _put_one_message():
put_one_message(pubkey, db)
time = timeit.timeit(_put_one_message, number=number)