summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2016-04-10 19:26:37 -0400
committerKali Kaneko (leap communications) <kali@leap.se>2016-04-10 19:26:37 -0400
commit49845b97cb19fb521752270c50dc06739e1785c9 (patch)
tree64571e59a76bbe550d1048840f42f0dfd3e3ab09
parentde71c3fba4036e80d842fad9da0310d6a0a93603 (diff)
revert initialization of soledad client
-rw-r--r--Makefile3
-rw-r--r--measure-perf-series.py1
-rwxr-xr-xserver_with_soledad_syncer.py10
-rw-r--r--soledad_sync.py10
4 files changed, 12 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index b570079..2b9b706 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,8 @@ measure-ping:
httperf --server localhost --port 8080 --num-calls 5 --num-conns 20 --uri /ping
trigger-sync:
- time curl localhost:8080/start-sync
+ #time curl localhost:8080/start-sync
+ curl localhost:8080/start-sync
measure-series:
# TODO make sure we have restarted the server, send SIGNUP ?
diff --git a/measure-perf-series.py b/measure-perf-series.py
index 6cfcb02..2c17ce7 100644
--- a/measure-perf-series.py
+++ b/measure-perf-series.py
@@ -6,6 +6,7 @@ import datetime
# you have significant variability in there.
POINTS = 200
+commands.getoutput('echo time req/s cpu mem > series.log')
start = datetime.datetime.now()
for i in range(POINTS):
diff --git a/server_with_soledad_syncer.py b/server_with_soledad_syncer.py
index 71aae56..0a2fb14 100755
--- a/server_with_soledad_syncer.py
+++ b/server_with_soledad_syncer.py
@@ -6,13 +6,10 @@ from klein import run, route
import soledad_sync as sync
-s = None
-
-
@route('/start-sync')
def home(request):
print "GOT REQUEST FOR STARTING SYNC..."
- d = sync.upload_soledad_stuff(s)
+ d = sync.upload_soledad_stuff()
return d
@@ -27,8 +24,7 @@ def pid(request):
if __name__ == "__main__":
- global s
- s = sync._get_soledad_instance_from_uuid(
- sync.UUID, 'pass', '/tmp/soledadsync', sync.HOST, '', '')
+ #s = sync._get_soledad_instance_from_uuid(
+ #sync.UUID, 'pass', '/tmp/soledadsync', sync.HOST, '', '')
run("localhost", 8080)
diff --git a/soledad_sync.py b/soledad_sync.py
index ca93206..76b01a9 100644
--- a/soledad_sync.py
+++ b/soledad_sync.py
@@ -3,11 +3,10 @@ from leap.soledad.client.api import Soledad
from twisted.internet import defer
# EDIT THIS TO MATCH YOUR TEST ENVIRONMENT -------------
-UUID = 'deadbeef'
+UUID = 'deadbeef3'
#HOST = 'http://futeisha:2323'
HOST = 'http://localhost:2323'
-#NUM_DOCS = 20
-NUM_DOCS = 1
+NUM_DOCS = 100
PAYLOAD = '/tmp/payload'
# ------------------------------------------------------
@@ -32,11 +31,14 @@ def onSyncDone(result):
print "SYNC DONE!", result
-def upload_soledad_stuff(s):
+def upload_soledad_stuff():
with open(PAYLOAD, 'r') as f:
payload = f.read()
+ s = _get_soledad_instance_from_uuid(
+ UUID, 'pass', '/tmp/soledadsync', HOST, '', '')
+
def do_sync(_):
d = s.sync()
d.addCallback(onSyncDone)