diff options
| author | Victor Shyba <victor.shyba@gmail.com> | 2015-10-20 15:31:09 -0300 | 
|---|---|---|
| committer | Victor Shyba <victor.shyba@gmail.com> | 2015-11-03 12:41:37 -0300 | 
| commit | 9830bd00964a1c83cfc92151446adda6f14fbc54 (patch) | |
| tree | 4a606f9a82ce63886b71a0a06775d34cac10709a /scripts/profiling | |
| parent | f0b96af943dcb6c8cde4f6d4280186d78c78096c (diff) | |
[refactor] CouchDocument is now ServerDocument
As SoledadBackend is intended to be database agnostic, a new generic
document is now used instead of the old one made for CouchDB. The only
attribute that really relates to couch was couch_rev, removed on this
commit as it can be set on CouchDatabase implementation when needed.
Diffstat (limited to 'scripts/profiling')
| -rw-r--r-- | scripts/profiling/mail/mx.py | 5 | 
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) | 
