diff options
author | Victor Shyba <victor1984@riseup.net> | 2017-09-14 19:56:20 -0300 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2017-09-14 21:34:27 -0300 |
commit | 20cc7ad7645e5a84ed11ec2149df91a9770fea6c (patch) | |
tree | 872461895e3b009ef0c63a8d358109aa79ca3224 | |
parent | 93250414c6ef77b69a0aca008ef28c778c48afe4 (diff) |
[refactor] improve instructions and fix small typos
-rw-r--r-- | scripts/benchmark/legacy-vs-blobs/README.rst | 2 | ||||
-rw-r--r-- | scripts/benchmark/legacy-vs-blobs/makefile | 8 | ||||
-rw-r--r-- | scripts/benchmark/legacy-vs-blobs/requirements.pip | 1 | ||||
-rw-r--r-- | scripts/benchmark/sqlite-blobs-backend/README.rst | 10 | ||||
-rw-r--r-- | scripts/benchmark/sqlite-blobs-backend/makefile | 6 | ||||
-rw-r--r-- | scripts/benchmark/sqlite-blobs-backend/requirements.pip | 1 |
6 files changed, 18 insertions, 10 deletions
diff --git a/scripts/benchmark/legacy-vs-blobs/README.rst b/scripts/benchmark/legacy-vs-blobs/README.rst index ca502b8a..1d8ab64c 100644 --- a/scripts/benchmark/legacy-vs-blobs/README.rst +++ b/scripts/benchmark/legacy-vs-blobs/README.rst @@ -18,7 +18,7 @@ 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, for each test group: - tox -e benchmarks -- -m benchmark_test_legacy_vs_blobs_10_1000k --benchmark-autosave + tox -e benchmark -- -m benchmark_test_legacy_vs_blobs_10_1000k --benchmark-autosave Each run of tox as above produces a JSON file in `soledad/tests/.benchmarks` with stats. Each file has to be copied in a subdirectory of the `data/` diff --git a/scripts/benchmark/legacy-vs-blobs/makefile b/scripts/benchmark/legacy-vs-blobs/makefile index 649e181c..819d2519 100644 --- a/scripts/benchmark/legacy-vs-blobs/makefile +++ b/scripts/benchmark/legacy-vs-blobs/makefile @@ -7,8 +7,10 @@ env: if [ ! -d $(VIRTUALENV_ROOT) ]; then \ mkdir -p $$(dirname $(VIRTUALENV_ROOT)); \ virtualenv $(VIRTUALENV_ROOT); \ - $(VIRTUALENV_ROOT)/bin/pip install requirements.pip; \ fi -graph: env - $(VIRTUALENV_ROOT)/bin/python ./legacy-vs-blobs.py +deps: env + $(VIRTUALENV_ROOT)/bin/pip install -r requirements.pip + +graph: deps + $(VIRTUALENV_ROOT)/bin/python ./gen-graph.py diff --git a/scripts/benchmark/legacy-vs-blobs/requirements.pip b/scripts/benchmark/legacy-vs-blobs/requirements.pip index db5d81e0..c80f5eae 100644 --- a/scripts/benchmark/legacy-vs-blobs/requirements.pip +++ b/scripts/benchmark/legacy-vs-blobs/requirements.pip @@ -1,2 +1,3 @@ matplotlib numpy +mpltools diff --git a/scripts/benchmark/sqlite-blobs-backend/README.rst b/scripts/benchmark/sqlite-blobs-backend/README.rst index 2d7a257f..991292b7 100644 --- a/scripts/benchmark/sqlite-blobs-backend/README.rst +++ b/scripts/benchmark/sqlite-blobs-backend/README.rst @@ -14,10 +14,12 @@ 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 +Once you done the above, do the following to benchmark and generate data: +```bash + chdir soledad/tests + tox -e benchmark -- -m sqlite_blobs_backend_get --benchmark-autosave + tox -e benchmark -- -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 diff --git a/scripts/benchmark/sqlite-blobs-backend/makefile b/scripts/benchmark/sqlite-blobs-backend/makefile index f8187e9a..819d2519 100644 --- a/scripts/benchmark/sqlite-blobs-backend/makefile +++ b/scripts/benchmark/sqlite-blobs-backend/makefile @@ -7,8 +7,10 @@ env: if [ ! -d $(VIRTUALENV_ROOT) ]; then \ mkdir -p $$(dirname $(VIRTUALENV_ROOT)); \ virtualenv $(VIRTUALENV_ROOT); \ - $(VIRTUALENV_ROOT)/bin/pip install requirements.pip; \ fi -graph: env +deps: env + $(VIRTUALENV_ROOT)/bin/pip install -r requirements.pip + +graph: deps $(VIRTUALENV_ROOT)/bin/python ./gen-graph.py diff --git a/scripts/benchmark/sqlite-blobs-backend/requirements.pip b/scripts/benchmark/sqlite-blobs-backend/requirements.pip index db5d81e0..c80f5eae 100644 --- a/scripts/benchmark/sqlite-blobs-backend/requirements.pip +++ b/scripts/benchmark/sqlite-blobs-backend/requirements.pip @@ -1,2 +1,3 @@ matplotlib numpy +mpltools |