Mercurial > hg > orthanc-tests
annotate PerfsDb/README.md @ 197:2bc4598c849d
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 07 Jan 2019 10:26:41 +0100 |
parents | 29cb1ee97035 |
children | 705fa4447154 |
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 | |
196 | 59 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
|
60 python Run.py --orthanc-path=/home/amazy/builds/orthanc-build-release/ --plugins-path=/home/amazy/builds/mysql-release/ --init --mysql-tiny |
196 | 61 |
62 on benchmark VM: | |
197 | 63 python Run.py --orthanc-path=/data-hdd-3g/orthanc-binaries/ --plugins-path=/data-hdd-3g/orthanc-binaries/ --init --pg9bis-tiny |
156 | 64 ``` |
65 | |
66 Clearing a DB | |
67 ----------------- | |
68 | |
69 ```bash | |
196 | 70 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
|
71 python Run.py --orthanc-path=/home/amazy/builds/orthanc-build-release/ --plugins-path=/home/amazy/builds/mysql-release/ --clear --mysql-tiny |
196 | 72 |
73 on benchmark VM: | |
197 | 74 python Run.py --orthanc-path=/data-hdd-3g/orthanc-binaries/ --plugins-path=/data-hdd-3g/orthanc-binaries/ --clear --pg9bis-tiny |
156 | 75 ``` |
76 | |
158
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
77 Runing tests on multiple DBs |
156 | 78 ----------------- |
79 | |
80 ```bash | |
160 | 81 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
|
82 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 | 83 |
160 | 84 on benchmark VM: |
196 | 85 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 | 86 |
156 | 87 ``` |
160 | 88 |
164 | 89 Command line options |
90 -------------------- | |
91 | |
160 | 92 ```bash |
164 | 93 --clear to clear the DB |
94 --init to initialize the DB | |
95 --run to run the tests | |
96 | |
97 --config to include the config in the test run/init/clear | |
160 | 98 |
164 | 99 --orthanc-path path to the folder where the Orthanc execuble lies |
100 --plugins-path path to the folder where the Orthanc plugins lie | |
101 | |
102 --test-filter=*ByPatient* to filter the tests to execute | |
103 --repeat=20 to repeate each test N times (default is 20) | |
196 | 104 ``` |