From 9f5d4c8c3d40f0f9b8959afdb8bd2c80e3935829 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Fri, 8 Apr 2016 14:54:06 -0400 Subject: fixed graphing --- get-client-cpu-mem.py | 2 +- series-develop.png | Bin 68605 -> 150053 bytes series-ping.py | 9 +- series.log | 400 +++++++++++++++++++++++++++++++++++++------------- soledad_sync.py | 6 +- 5 files changed, 311 insertions(+), 106 deletions(-) diff --git a/get-client-cpu-mem.py b/get-client-cpu-mem.py index 0dd1aac..7dc9f26 100644 --- a/get-client-cpu-mem.py +++ b/get-client-cpu-mem.py @@ -1,6 +1,6 @@ import commands -pid = commands.getoutput('ps x | grep "[s]erver-solsync" | cut -d " " -f 2') +pid = commands.getoutput('ps x | grep "server-solsync" | head -n 1 | cut -d " " -f 2') res = commands.getoutput("ps -p " + pid + " -o \%cpu,\%mem") splitted = res.split() cpu = splitted[2] diff --git a/series-develop.png b/series-develop.png index f77f158..e56a78e 100644 Binary files a/series-develop.png and b/series-develop.png differ diff --git a/series-ping.py b/series-ping.py index 0993d08..c4fc508 100644 --- a/series-ping.py +++ b/series-ping.py @@ -1,7 +1,10 @@ import commands import datetime -POINTS = 100 +# How many points to measure. Make sure that you leave the baseline +# running for a significative amount before triggering the sync, it's possible +# you have significant variability in there. +POINTS = 200 start = datetime.datetime.now() @@ -10,7 +13,9 @@ for i in range(POINTS): print "Step", i, "...", value cpu_mem = commands.getoutput('python get-client-cpu-mem.py') cpu, mem = cpu_mem.split() + #print "CPU/MEM", cpu, mem now = datetime.datetime.now() - secs = (now - start).seconds + secs = (now - start).total_seconds() + #print "TOOK", secs, "seconds" commands.getoutput( 'echo %s\t%s\t%s\t%s >> series.log' % (secs, value, cpu, mem)) diff --git a/series.log b/series.log index ee0a551..b9f1659 100644 --- a/series.log +++ b/series.log @@ -1,100 +1,300 @@ -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 +0.259543 159.7 7.4 5.4 +0.509625 159.2 7.5 5.4 +0.737543 183.7 7.5 5.4 +1.055315 105.7 7.5 5.4 +1.307917 153.3 7.5 5.4 +1.545195 165.4 7.6 5.4 +1.78702 161.0 7.6 5.4 +2.086963 114.7 7.6 5.4 +2.313378 186.7 7.6 5.4 +2.57548 142.2 7.7 5.4 +2.818901 160.1 7.7 5.4 +3.09769 148.2 7.7 5.4 +3.36018 140.6 7.7 5.4 +3.584502 191.8 7.7 5.4 +3.826293 169.0 7.7 5.4 +4.163663 93.5 7.8 5.4 +4.414141 152.1 7.8 5.4 +4.661176 157.8 7.8 5.4 +4.915328 156.2 7.8 5.4 +5.185932 151.9 7.9 5.4 +5.42343 186.9 7.9 5.4 +5.684328 146.1 7.9 5.4 +5.963845 157.6 7.9 5.4 +6.229259 138.3 8.0 5.4 +6.468259 174.4 8.0 5.4 +6.704708 173.0 8.0 5.4 +7.038841 95.1 8.0 5.4 +7.281762 162.5 8.1 5.4 +7.612329 96.5 8.1 5.0 +7.865078 154.6 8.1 5.0 +8.114871 170.4 8.1 5.0 +8.364628 161.6 8.2 5.0 +8.614169 155.4 8.2 5.0 +8.86244 168.0 8.2 5.0 +9.189823 111.7 8.2 5.0 +9.43288 166.7 8.2 5.0 +9.680825 161.5 8.3 5.0 +9.986503 107.0 8.3 5.0 +10.270062 135.1 8.3 5.0 +10.525472 150.4 8.3 5.0 +10.781422 161.9 8.3 5.0 +11.086377 110.7 8.4 5.0 +11.389041 112.6 8.4 5.0 +11.669798 127.5 8.4 5.0 +11.953784 139.8 8.4 5.0 +12.235217 137.9 8.5 5.0 +14.051527 11.9 8.4 5.0 +14.311905 159.1 8.5 5.0 +14.547009 180.0 8.5 5.0 +14.793393 158.3 8.5 5.0 +15.037085 178.7 8.5 5.0 +15.317321 142.0 8.6 5.0 +15.553038 178.9 8.6 5.0 +15.816551 149.8 8.6 5.0 +16.099962 168.5 8.6 5.0 +16.341654 168.6 8.6 5.0 +16.598884 142.7 8.7 5.0 +17.479059 26.6 8.7 5.0 +17.743602 144.2 8.7 5.0 +18.092384 90.2 8.7 5.0 +18.35751 145.1 8.7 5.0 +18.614586 157.8 8.8 5.0 +18.91004 136.3 8.8 5.0 +19.162786 157.3 8.8 5.0 +19.435824 140.6 8.8 5.0 +19.718579 131.5 8.8 5.0 +19.999973 126.1 8.9 5.0 +20.319312 101.1 8.9 5.0 +20.591014 132.1 8.9 5.0 +20.867462 141.9 8.9 5.0 +21.178421 142.3 9.0 5.0 +21.452114 135.1 9.0 5.0 +21.711696 144.4 9.0 5.0 +21.996712 122.4 9.0 5.0 +22.292734 140.7 9.0 5.0 +22.565696 129.9 9.1 5.0 +22.815605 160.4 9.1 5.0 +23.144368 104.0 9.1 5.0 +23.391981 164.3 9.1 5.0 +23.665578 129.6 9.1 5.0 +23.9915 109.4 9.2 5.0 +24.264483 134.0 9.2 5.0 +24.528836 136.2 9.2 5.0 +24.771423 165.0 9.2 5.0 +25.080975 109.4 9.2 5.0 +25.363321 127.0 9.3 5.0 +25.611268 166.4 9.3 5.0 +25.922275 113.7 9.3 5.0 +26.208717 119.7 9.3 5.0 +26.477392 137.3 9.4 5.0 +26.751488 137.2 9.4 5.0 +27.009657 145.2 9.4 5.0 +27.301831 124.6 9.4 5.0 +27.571844 136.5 9.4 5.0 +27.844116 135.0 9.4 5.0 +28.162552 106.7 9.5 5.0 +28.468068 112.1 9.5 5.0 +28.70845 163.9 9.5 5.0 +28.990019 150.2 9.5 5.0 +29.267218 142.3 9.6 5.0 +0.266205 157.9 7.3 5.0 +0.520728 146.3 7.3 5.0 +0.831233 114.4 7.3 5.0 +1.120712 128.6 7.3 5.0 +1.368645 168.8 7.3 5.0 +1.634739 139.2 7.3 5.0 +1.969744 106.6 7.4 5.0 +2.245561 130.8 7.4 5.0 +2.513929 142.8 7.4 5.0 +2.75486 162.2 7.4 5.0 +3.062365 111.7 7.4 5.0 +3.309996 166.2 7.4 5.0 +3.572638 141.8 7.4 5.0 +3.876265 131.1 7.5 5.0 +4.139114 137.4 7.5 5.0 +4.380514 165.6 7.5 5.0 +4.621876 159.1 7.5 5.0 +4.944165 98.7 7.5 5.0 +5.182366 169.7 7.6 5.0 +5.407127 194.1 7.6 5.0 +5.644052 165.5 7.6 5.0 +5.913121 137.5 7.6 5.0 +6.192385 127.9 7.6 5.0 +6.434551 172.0 7.6 5.0 +6.680776 162.3 7.6 5.0 +6.956884 141.5 7.7 5.0 +7.209074 179.3 7.7 5.0 +7.433491 194.2 7.7 5.0 +12.404452 4.1 8.5 6.3 +13.072142 43.3 8.6 6.5 +13.640579 51.1 8.7 6.5 +14.412614 33.9 8.8 6.5 +14.916729 61.6 8.9 6.6 +15.454222 48.9 8.9 6.6 +15.742194 124.1 8.9 6.6 +16.16353 73.0 9.0 6.6 +16.472559 110.0 9.0 6.6 +16.744245 136.3 9.1 6.6 +18.444819 13.0 9.3 8.4 +18.684455 171.6 9.3 8.4 +19.162902 56.4 9.3 8.6 +19.436876 140.3 9.3 8.3 +19.884468 62.2 9.4 8.7 +20.241011 102.4 9.4 8.8 +20.502072 154.4 9.4 8.8 +20.743719 163.4 9.4 8.8 +21.156944 74.2 9.5 9.0 +21.514513 107.6 9.5 9.0 +21.778286 156.5 9.5 9.0 +22.05139 153.4 9.5 9.0 +22.338722 153.1 9.6 9.0 +22.584835 161.9 9.6 9.0 +23.002857 66.3 9.6 9.1 +23.252232 156.3 9.7 9.1 +23.602723 100.4 9.7 9.1 +23.866286 155.1 9.7 9.1 +24.210065 91.0 9.8 9.1 +24.454182 161.7 9.8 9.1 +24.86181 74.3 9.8 9.2 +25.128125 137.2 9.8 9.2 +25.501787 81.3 9.9 9.2 +25.773912 144.6 9.9 9.2 +26.205189 63.9 9.9 9.2 +26.44997 174.8 9.9 9.2 +26.806737 94.4 10.0 9.4 +27.075657 168.2 10.0 9.4 +27.445091 109.7 10.0 9.4 +27.708385 141.5 10.0 9.4 +28.144987 65.7 10.1 9.4 +28.392198 160.8 10.1 9.4 +28.828807 70.2 10.1 9.5 +29.194754 109.1 10.2 9.5 +29.47065 136.2 10.2 9.5 +29.759906 167.3 10.2 9.5 +30.096418 115.2 10.2 9.5 +30.483697 81.7 10.3 9.6 +30.750003 141.9 10.3 9.6 +31.133315 87.1 10.3 9.6 +31.546914 70.2 10.3 9.6 +31.899733 84.7 10.4 9.6 +32.148361 154.6 10.4 9.6 +32.388111 166.4 10.4 9.6 +32.662931 132.3 10.4 9.6 +32.982237 101.6 10.4 9.6 +33.227243 158.1 10.4 9.6 +33.487902 146.1 10.5 9.6 +33.73726 157.5 10.5 9.6 +33.984432 162.9 10.5 9.6 +34.290403 109.2 10.5 9.6 +34.546784 145.1 10.5 9.6 +34.830992 125.9 10.5 9.6 +35.150351 107.2 10.5 9.6 +35.421137 134.3 10.6 9.6 +35.681874 140.0 10.6 9.6 +35.97247 132.8 10.6 9.6 +36.216599 168.0 10.6 9.6 +36.468188 150.0 10.6 9.6 +36.738483 134.5 10.6 9.6 +37.098429 83.0 10.6 9.6 +37.346308 158.5 10.6 9.6 +37.590212 161.0 10.6 9.6 +37.90854 103.0 10.7 9.6 +38.1578 155.6 10.7 9.6 +38.418501 143.6 10.7 9.6 +38.674479 152.5 10.7 9.6 +38.994724 99.5 10.7 9.6 +39.289347 116.0 10.7 9.6 +39.536014 162.0 10.7 9.6 +39.829252 118.9 10.8 9.6 +40.129722 125.7 10.8 9.6 +40.398244 134.8 10.8 9.6 +40.64662 157.1 10.8 9.6 +40.907604 147.4 10.8 9.6 +41.270687 82.0 10.8 6.9 +41.564631 115.4 10.8 6.9 +41.824493 157.6 10.9 6.9 +42.110832 122.0 10.9 6.9 +42.38272 131.1 10.9 6.9 +42.643062 145.0 10.9 6.9 +42.975152 107.9 10.9 6.9 +43.223713 154.4 10.9 6.9 +43.473293 156.3 11.0 6.9 +43.735562 139.7 11.0 6.9 +44.055111 106.1 11.0 6.9 +44.320048 146.8 11.0 6.9 +44.57003 158.7 11.0 6.9 +44.811475 189.5 11.0 6.9 +45.062386 163.6 11.0 6.9 +45.310209 161.9 11.0 6.9 +45.533553 195.1 11.0 6.9 +45.764699 197.6 11.1 6.9 +45.998491 176.9 11.1 6.9 +46.262707 139.8 11.1 6.9 +46.486896 193.3 11.1 6.9 +46.713896 194.0 11.1 6.9 +46.96338 154.7 11.1 6.9 +47.243216 142.1 11.1 6.9 +47.497342 151.3 11.2 6.9 +47.749053 156.0 11.2 6.9 +48.062701 108.6 11.2 6.9 +48.325098 142.9 11.2 6.9 +48.564 167.2 11.2 6.9 +48.836446 146.2 11.2 6.9 +49.11287 148.7 11.2 6.9 +49.352858 166.8 11.3 6.9 +49.606044 153.2 11.3 6.9 +49.898123 127.3 11.3 6.9 +50.162404 139.7 11.3 6.9 +50.400256 180.6 11.3 6.9 +50.630826 178.1 11.3 6.9 +50.951075 101.4 11.3 6.9 +51.197597 156.9 11.3 6.9 +51.452466 149.3 11.4 6.9 +51.707765 147.4 11.4 6.9 +51.959541 176.2 11.4 6.9 +52.23963 128.5 11.4 6.9 +52.508646 141.1 11.4 6.9 +52.765382 148.9 11.4 6.9 +53.062483 128.6 11.4 6.9 +53.325061 143.1 11.5 6.9 +53.576494 164.5 11.5 6.9 +53.828097 180.4 11.5 6.9 +54.138916 109.9 11.5 6.9 +54.405163 145.7 11.5 6.9 +54.648418 164.2 11.5 6.9 +54.959008 122.8 11.5 6.9 +55.19659 173.9 11.5 6.9 +55.481332 125.1 11.6 6.9 +55.745609 150.2 11.6 6.9 +56.045961 117.0 11.6 6.9 +56.307392 153.5 11.6 6.9 +56.542448 171.8 11.6 6.9 +56.838635 149.9 11.6 6.9 +57.082684 169.1 11.6 6.9 +57.315996 183.9 11.6 6.9 +57.562312 158.8 11.6 6.9 +57.830683 142.8 11.7 6.9 +58.072877 191.0 11.7 6.9 +58.367424 115.2 11.7 6.9 +58.62404 148.6 11.7 6.9 +58.889082 149.2 11.7 6.9 +59.193137 108.1 11.7 6.9 +59.42382 179.8 11.8 6.9 +59.679279 163.9 11.8 6.9 +60.050406 81.4 11.8 6.9 +60.30959 144.4 11.8 6.9 +60.581107 135.6 11.8 6.9 +60.850863 145.5 11.8 6.9 +61.118505 157.9 11.8 6.9 +61.378511 144.7 11.8 6.9 +61.610851 185.7 11.8 6.9 +61.918771 104.7 11.9 6.9 +62.208759 117.6 11.9 6.9 +62.453382 170.6 11.9 6.9 +62.700913 156.3 11.9 6.9 +63.005722 128.3 11.9 6.9 +63.254695 166.3 11.9 6.9 +63.505091 155.7 11.9 6.9 +63.767207 155.5 11.9 6.9 +64.042138 131.2 12.0 6.9 diff --git a/soledad_sync.py b/soledad_sync.py index 8d5eceb..63beb87 100644 --- a/soledad_sync.py +++ b/soledad_sync.py @@ -4,9 +4,9 @@ from twisted.internet import defer # EDIT THIS TO MATCH YOUR TEST ENVIRONMENT ------------- UUID = 'deadbeef' -#HOST = 'http://futeisha:2323' -HOST = 'http://localhost:2323' -NUM_DOCS = 5 +HOST = 'http://futeisha:2323' +# HOST = 'http://localhost:2323' +NUM_DOCS = 20 PAYLOAD = '/tmp/payload' # ------------------------------------------------------ -- cgit v1.2.3