Mercurial > hg > orthanc-tests
annotate PerfsDb/README.md @ 385:17e14efcc7fb
Added tag Orthanc-1.9.1 for changeset 9a41306c1fe5
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 25 Feb 2021 18:28:00 +0100 |
parents | 705fa4447154 |
children |
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 | |
198 | 49 To enter the virtual-env the next times (on benchmark VM): |
156 | 50 |
51 ```bash | |
198 | 52 cd /data-hdd-3g/orthanc-tests/PerfsDb |
156 | 53 source .env/bin/activate |
54 ``` | |
55 | |
56 Initializing a DB before tests | |
57 ----------------- | |
58 | |
59 ```bash | |
196 | 60 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
|
61 python Run.py --orthanc-path=/home/amazy/builds/orthanc-build-release/ --plugins-path=/home/amazy/builds/mysql-release/ --init --mysql-tiny |
196 | 62 |
63 on benchmark VM: | |
198 | 64 python Run.py --orthanc-path=/data-hdd-3g/orthanc-binaries/ --plugins-path=/data-hdd-3g/orthanc-binaries/ --init --pg9bis-small |
156 | 65 ``` |
66 | |
67 Clearing a DB | |
68 ----------------- | |
69 | |
70 ```bash | |
196 | 71 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
|
72 python Run.py --orthanc-path=/home/amazy/builds/orthanc-build-release/ --plugins-path=/home/amazy/builds/mysql-release/ --clear --mysql-tiny |
196 | 73 |
74 on benchmark VM: | |
198 | 75 python Run.py --orthanc-path=/data-hdd-3g/orthanc-binaries/ --plugins-path=/data-hdd-3g/orthanc-binaries/ --clear --pg9bis-small |
156 | 76 ``` |
77 | |
158
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
78 Runing tests on multiple DBs |
156 | 79 ----------------- |
80 | |
81 ```bash | |
160 | 82 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
|
83 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 | 84 |
160 | 85 on benchmark VM: |
196 | 86 python Run.py --orthanc-path=/data-hdd-3g/orthanc-binaries/ --plugins-path=/data-hdd-3g/orthanc-binaries/ --run --pg9-tiny --pg10-tiny --pg11-tiny --mysql-tiny --sqlite-tiny --mssql-tiny |
159 | 87 |
156 | 88 ``` |
160 | 89 |
164 | 90 Command line options |
91 -------------------- | |
92 | |
160 | 93 ```bash |
164 | 94 --clear to clear the DB |
95 --init to initialize the DB | |
96 --run to run the tests | |
97 | |
98 --config to include the config in the test run/init/clear | |
160 | 99 |
164 | 100 --orthanc-path path to the folder where the Orthanc execuble lies |
101 --plugins-path path to the folder where the Orthanc plugins lie | |
102 | |
103 --test-filter=*ByPatient* to filter the tests to execute | |
104 --repeat=20 to repeate each test N times (default is 20) | |
196 | 105 ``` |