summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2016-04-08 03:16:18 -0400
committerKali Kaneko (leap communications) <kali@leap.se>2016-04-08 03:16:18 -0400
commit9abd16fcbc23306e542aaa5cdc2ea8e9847dbfd7 (patch)
treee3515203616179e9f81392e3ae6017fe91be70b9
parent4dec62b52e9ee5982fc3587ea6c8eefc21d76417 (diff)
add ability to trigger a sync and measure reactor responsiveness
this is bad news though: we're blocking the reactor with the current implementation. what's the culprit?? stay tuned...
-rw-r--r--Makefile16
-rw-r--r--README.rst9
-rw-r--r--get_ping_rate.py7
-rwxr-xr-xgraphit6
-rw-r--r--series-develop.pngbin0 -> 40932 bytes
-rw-r--r--series-ping.py5
-rw-r--r--series.log100
-rw-r--r--soledad_sync.py4
8 files changed, 144 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 9bb781a..7ec4a96 100644
--- a/Makefile
+++ b/Makefile
@@ -15,3 +15,19 @@ thread-server:
ampoule-server:
python server3.py
+
+soledad-sync-server:
+ python server-solsync.py
+
+measure-ping:
+ httperf --server localhost --port 8080 --num-calls 5 --num-conns 20 --uri /ping
+
+trigger-sync:
+ curl localhost:8080/start-sync
+
+measure-series:
+ # TODO rm series.log, name it with a timestamp
+ python series-ping.py
+
+graph-series:
+ data=series.log ./graphit
diff --git a/README.rst b/README.rst
index 8aefa3d..7aaaa14 100644
--- a/README.rst
+++ b/README.rst
@@ -58,10 +58,17 @@ c) **Simultaneous easy+load**: Observe how the no-cpu perf case degrades when ru
* experiment with different parameters for the process pool.
+Run debug soledad server
+-------------------------
+need patched branch::
+ twistd -n web --port 2323 --wsgi leap.soledad.server.debug_local_application_do_not_use
+
+
To-Do
--------------
* [x] make the cpu load variable (parameter to fib function: pass it as env var).
-* [ ] graph req/sec in response to variable cpu loads (parameter to fib).
+* [x] graph req/sec in response to variable cpu loads (parameter to fib).
* [ ] graph response of perf-easy DURING a run of perf/perf-little.
* [ ] compare the rate of responsiveness against variable cpu loads.
* [ ] scale these minimalistic examples to realistic payload decryption using gnupg.
+
diff --git a/get_ping_rate.py b/get_ping_rate.py
new file mode 100644
index 0000000..bf11f53
--- /dev/null
+++ b/get_ping_rate.py
@@ -0,0 +1,7 @@
+import commands
+import re
+
+res = commands.getoutput(
+ 'httperf --server localhost --port 8080 --num-calls 5 --num-conns 20 '
+ '--uri /ping | grep "Connection rate"')
+print re.findall('[-+]?([0-9]*\.?[0-9]+)', res)[0]
diff --git a/graphit b/graphit
new file mode 100755
index 0000000..177c040
--- /dev/null
+++ b/graphit
@@ -0,0 +1,6 @@
+#! /usr/bin/gnuplot
+
+name=system("echo $data")
+set title name
+plot name with linespoints notitle
+pause -1
diff --git a/series-develop.png b/series-develop.png
new file mode 100644
index 0000000..22dc0f6
--- /dev/null
+++ b/series-develop.png
Binary files differ
diff --git a/series-ping.py b/series-ping.py
new file mode 100644
index 0000000..077c5ef
--- /dev/null
+++ b/series-ping.py
@@ -0,0 +1,5 @@
+import commands
+for i in range(100):
+ value = commands.getoutput('python get_ping_rate.py')
+ print "Step", i, "...", value
+ commands.getoutput('echo %s\t%s >> series.log' % (i, value))
diff --git a/series.log b/series.log
new file mode 100644
index 0000000..ee0a551
--- /dev/null
+++ b/series.log
@@ -0,0 +1,100 @@
+0 97.8
+1 78.3
+2 136.3
+3 144.1
+4 87.6
+5 122.1
+6 111.9
+7 115.6
+8 105.8
+9 141.8
+10 129.0
+11 97.0
+12 111.2
+13 139.9
+14 98.8
+15 141.2
+16 133.5
+17 140.5
+18 140.0
+19 91.2
+20 110.5
+21 130.9
+22 92.8
+23 59.1
+24 49.4
+25 66.3
+26 104.3
+27 95.3
+28 143.4
+29 117.0
+30 126.4
+31 145.4
+32 98.6
+33 81.8
+34 97.5
+35 143.1
+36 126.9
+37 76.2
+38 143.0
+39 143.3
+40 98.7
+41 135.9
+42 114.2
+43 118.8
+44 109.3
+45 142.4
+46 103.3
+47 113.2
+48 89.8
+49 69.8
+50 1.1
+51 55.0
+52 24.5
+53 31.2
+54 36.0
+55 40.6
+56 36.9
+57 47.4
+58 21.1
+59 45.1
+60 47.5
+61 49.1
+62 19.3
+63 27.3
+64 38.4
+65 35.9
+66 49.6
+67 31.1
+68 54.6
+69 42.3
+70 43.7
+71 43.8
+72 30.1
+73 21.9
+74 52.3
+75 27.1
+76 36.1
+77 52.7
+78 46.3
+79 45.7
+80 46.2
+81 37.6
+82 55.9
+83 28.7
+84 19.4
+85 33.6
+86 43.6
+87 55.9
+88 65.3
+89 104.0
+90 91.0
+91 55.8
+92 3.3
+93 52.0
+94 63.5
+95 42.8
+96 65.3
+97 40.3
+98 50.0
+99 49.0
diff --git a/soledad_sync.py b/soledad_sync.py
index 403433e..654bc9a 100644
--- a/soledad_sync.py
+++ b/soledad_sync.py
@@ -3,9 +3,9 @@ from leap.soledad.client.api import Soledad
from twisted.internet import defer
-UUID = 'deadbeef1'
+UUID = 'deadbeef2'
HOST = 'http://localhost:2323'
-NUM_DOCS = 20
+NUM_DOCS = 100
PAYLOAD = '/tmp/payload'