Mercurial > hg > orthanc-tests
annotate PerfsDb/README.md @ 186:8feebc2bf9fc
test options expand and limit to /queries/.../answers
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Nov 2018 20:36:08 +0100 |
parents | ff939d07989f |
children | 29cb1ee97035 |
rev | line source |
---|---|
156 | 1 Performance Db tests |
2 ==================== | |
3 | |
4 Introduction | |
5 ------------ | |
6 | |
7 This project performs benchmark tests of Orthanc with its various DB servers. | |
8 | |
9 It can be used to: | |
10 | |
11 - compare DB servers performance | |
12 - compare performance between small and big DB | |
13 - test the effectiveness of some code refactoring | |
14 | |
15 In a first step, the project creates a set of DB servers and populates them. | |
16 Then, it will perform a set of basic operations on Orthanc with each of these servers | |
17 and measure the time required for each operation. | |
18 | |
19 Timings are measured at the API level. Since we want to measure mainly the DB performance, | |
20 we'll mainly use very small DICOM files (without pixels data). | |
21 | |
22 Prerequisites | |
23 ------------- | |
24 | |
159 | 25 - install standard tools |
164 | 26 |
159 | 27 ```bash |
28 sudo apt-get install -y mercurial wget curl | |
29 ``` | |
30 | |
156 | 31 - install python3, pip3 and pipenv |
32 | |
33 ```bash | |
34 sudo apt-get install -y python3 python3-pip python3-venv | |
35 ``` | |
36 | |
37 - [install Docker-CE](https://docs.docker.com/install/linux/docker-ce/ubuntu/#set-up-the-repository) | |
38 - have access to docker without typing `sudo`. This is done by typing: `sudo groupadd docker` and `sudo usermod -aG docker $USER` | |
39 - have Orthanc and its DB plugins natively installed or compiled on your host system | |
40 | |
41 Once all prerequisites are installed, you should always execute all commands from a python virtual-env. To initialize the virtual env the first time: | |
42 | |
43 ```bash | |
44 python3 -m venv .env | |
45 source .env/bin/activate | |
46 pip install -r requirements.txt | |
47 ``` | |
48 | |
49 To enter the virtual-env the next times: | |
50 | |
51 ```bash | |
52 source .env/bin/activate | |
53 ``` | |
54 | |
55 Initializing a DB before tests | |
56 ----------------- | |
57 | |
58 ```bash | |
158
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
59 python Run.py --orthanc-path=/home/amazy/builds/orthanc-build-release/ --plugins-path=/home/amazy/builds/mysql-release/ --init --mysql-tiny |
156 | 60 ``` |
61 | |
62 Clearing a DB | |
63 ----------------- | |
64 | |
65 ```bash | |
158
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
66 python Run.py --orthanc-path=/home/amazy/builds/orthanc-build-release/ --plugins-path=/home/amazy/builds/mysql-release/ --clear --mysql-tiny |
156 | 67 ``` |
68 | |
158
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
69 Runing tests on multiple DBs |
156 | 70 ----------------- |
71 | |
72 ```bash | |
160 | 73 on amazy PC: |
158
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
74 python Run.py --orthanc-path=/home/amazy/builds/orthanc-build-release/ --plugins-path=/home/amazy/builds/orthanc-build-release/ --run --pg9-tiny --pg10-tiny --pg11-tiny --mysql-tiny --sqlite-tiny --mssql-tiny |
159 | 75 |
160 | 76 on benchmark VM: |
159 | 77 python Run.py --orthanc-path=/data/orthanc-binaries/ --plugins-path=/data/orthanc-binaries/ --run --pg9-tiny --pg10-tiny --pg11-tiny --mysql-tiny --sqlite-tiny --mssql-tiny |
78 | |
156 | 79 ``` |
160 | 80 |
164 | 81 Command line options |
82 -------------------- | |
83 | |
160 | 84 ```bash |
164 | 85 --clear to clear the DB |
86 --init to initialize the DB | |
87 --run to run the tests | |
88 | |
89 --config to include the config in the test run/init/clear | |
160 | 90 |
164 | 91 --orthanc-path path to the folder where the Orthanc execuble lies |
92 --plugins-path path to the folder where the Orthanc plugins lie | |
93 | |
94 --test-filter=*ByPatient* to filter the tests to execute | |
95 --repeat=20 to repeate each test N times (default is 20) | |
160 | 96 ``` |