diff options
author | Kali Kaneko <kali@leap.se> | 2017-06-26 16:48:40 +0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-06-26 16:48:40 +0200 |
commit | a653032662c990c662bf6706b0784bce1c553cbd (patch) | |
tree | bd126e8d3614f6a29f055c89e0546108b4aefc1f /src/leap/soledad/client/examples/plot-async-db.py | |
parent | 80699961145de3941c645ab3d8f3a4f9c2775ef3 (diff) |
[pkg] move examples folder to docs/
Diffstat (limited to 'src/leap/soledad/client/examples/plot-async-db.py')
-rw-r--r-- | src/leap/soledad/client/examples/plot-async-db.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/leap/soledad/client/examples/plot-async-db.py b/src/leap/soledad/client/examples/plot-async-db.py deleted file mode 100644 index 018a1a1d..00000000 --- a/src/leap/soledad/client/examples/plot-async-db.py +++ /dev/null @@ -1,45 +0,0 @@ -import csv -from matplotlib import pyplot as plt - -FILE = "bench.csv" - -# config the plot -plt.xlabel('number of inserts') -plt.ylabel('time (seconds)') -plt.title('SQLCipher parallelization') - -kwargs = { - 'linewidth': 1.0, - 'linestyle': '-', -} - -series = (('sync', 'r'), - ('async', 'g')) - -data = {'mark': [], - 'sync': [], - 'async': []} - -with open(FILE, 'rb') as csvfile: - series_reader = csv.reader(csvfile, delimiter=',') - for m, s, a in series_reader: - data['mark'].append(int(m)) - data['sync'].append(float(s)) - data['async'].append(float(a)) - -xmax = max(data['mark']) -xmin = min(data['mark']) -ymax = max(data['sync'] + data['async']) -ymin = min(data['sync'] + data['async']) - -for run in series: - name = run[0] - color = run[1] - plt.plot(data['mark'], data[name], label=name, color=color, **kwargs) - -plt.axes().annotate("", xy=(xmax, ymax)) -plt.axes().annotate("", xy=(xmin, ymin)) - -plt.grid() -plt.legend() -plt.show() |