Mercurial > hg > orthanc-tests
comparison PerfsDb/README.md @ 156:f1a75985caa8
first Db test framework - work in progress
author | am@osimis.io |
---|---|
date | Thu, 16 Aug 2018 17:13:32 +0200 |
parents | |
children | df1f9946571c |
comparison
equal
deleted
inserted
replaced
155:e0996602b306 | 156:f1a75985caa8 |
---|---|
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 | |
25 - install python3, pip3 and pipenv | |
26 | |
27 ```bash | |
28 sudo apt-get install -y python3 python3-pip python3-venv | |
29 ``` | |
30 | |
31 - [install Docker-CE](https://docs.docker.com/install/linux/docker-ce/ubuntu/#set-up-the-repository) | |
32 - [install docker-compose](https://docs.docker.com/compose/install/) | |
33 - have access to docker without typing `sudo`. This is done by typing: `sudo groupadd docker` and `sudo usermod -aG docker $USER` | |
34 - have Orthanc and its DB plugins natively installed or compiled on your host system | |
35 | |
36 Once all prerequisites are installed, you should always execute all commands from a python virtual-env. To initialize the virtual env the first time: | |
37 | |
38 ```bash | |
39 python3 -m venv .env | |
40 source .env/bin/activate | |
41 pip install -r requirements.txt | |
42 ``` | |
43 | |
44 To enter the virtual-env the next times: | |
45 | |
46 ```bash | |
47 source .env/bin/activate | |
48 ``` | |
49 | |
50 Initializing a DB before tests | |
51 ----------------- | |
52 | |
53 ```bash | |
54 python run.py --orthanc-path=/home/amazy/builds/orthanc-build-release/ --plugins-path=/home/amazy/builds/mysql-release/ --init --mysql-small | |
55 ``` | |
56 | |
57 Clearing a DB | |
58 ----------------- | |
59 | |
60 ```bash | |
61 python run.py --orthanc-path=/home/amazy/builds/orthanc-build-release/ --plugins-path=/home/amazy/builds/mysql-release/ --clear --mysql-small | |
62 ``` | |
63 | |
64 Runing tests on two DBs | |
65 ----------------- | |
66 | |
67 ```bash | |
68 python run.py --orthanc-path=/home/amazy/builds/orthanc-build-release/ --plugins-path=/home/amazy/builds/mysql-release/ --run --mysql-large --mysql-small | |
69 ``` |