summaryrefslogtreecommitdiff
path: root/scripts/benchmark/sqlite-blobs-backend/README.rst
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2017-09-13 12:09:41 -0300
committerdrebs <drebs@riseup.net>2017-09-14 12:14:45 -0300
commit93250414c6ef77b69a0aca008ef28c778c48afe4 (patch)
tree1a394394ef1b5c0fae392474e95bc529708cf5eb /scripts/benchmark/sqlite-blobs-backend/README.rst
parentdd7b2e414adf2c84873debcd7b7d526859036bc2 (diff)
[test] add graph for sqlite blobs backend benchmark test
Diffstat (limited to 'scripts/benchmark/sqlite-blobs-backend/README.rst')
-rw-r--r--scripts/benchmark/sqlite-blobs-backend/README.rst35
1 files changed, 35 insertions, 0 deletions
diff --git a/scripts/benchmark/sqlite-blobs-backend/README.rst b/scripts/benchmark/sqlite-blobs-backend/README.rst
new file mode 100644
index 00000000..2d7a257f
--- /dev/null
+++ b/scripts/benchmark/sqlite-blobs-backend/README.rst
@@ -0,0 +1,35 @@
+Plotting SQLite Blobs Backend storage/retrieval speed
+=====================================================
+
+This script produces a bar graph comparing storage and retrieval times for
+different amount/sizes of incoming data (1 x 10M, 10 x 1M, 100 x 100K, 1000
+x 10K).
+
+Data acquisition
+----------------
+
+Data was gathered through different runs of the code in
+`soledad/tests/benchmarks/test_sqlite_blobs_backend.py`. As these tests are run
+twice by default, you should remove the second call to pytest in `tox.ini` that
+would cause a second run of the tests for measuring memory. This script only
+plots time, for now.
+
+Once you done the above, chdir into `soledad/tests` and do something like this:
+
+ tox -e benchmarks -- -m sqlite_blobs_backend_get --benchmark-autosave
+ tox -e benchmarks -- -m sqlite_blobs_backend_put --benchmark-autosave
+
+Each run of tox as above produces a JSON file in `soledad/tests/.benchmarks`
+with stats. Copy the first file into `data/get.json` and the second file into
+`data/put.json` (where `data/` is a subdir in the same directory of this readme
+file).
+
+Plotting
+--------
+
+Once you have all your data in subdirectories of the `data/` directory and the
+script is correctly tuned for your data, running `make` should be enough to
+create a virtualenvironment with dependencies and plotting data.
+
+By default, the script will generate a file called `./sqlite-blobs-backend.png`
+in the current directory with the plot of the data.