Mercurial > hg > orthanc-tests
annotate PerfsDb/README.md @ 159:616da104a996
fix for ubuntu 18.04
author | am@osimis.io |
---|---|
date | Fri, 17 Aug 2018 14:49:59 +0200 |
parents | df1f9946571c |
children | 6995d5d12d88 |
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 |
26 ```bash | |
27 sudo apt-get install -y mercurial wget curl | |
28 ``` | |
29 | |
156 | 30 - install python3, pip3 and pipenv |
31 | |
32 ```bash | |
33 sudo apt-get install -y python3 python3-pip python3-venv | |
34 ``` | |
35 | |
36 - [install Docker-CE](https://docs.docker.com/install/linux/docker-ce/ubuntu/#set-up-the-repository) | |
37 - have access to docker without typing `sudo`. This is done by typing: `sudo groupadd docker` and `sudo usermod -aG docker $USER` | |
38 - have Orthanc and its DB plugins natively installed or compiled on your host system | |
39 | |
40 Once all prerequisites are installed, you should always execute all commands from a python virtual-env. To initialize the virtual env the first time: | |
41 | |
42 ```bash | |
43 python3 -m venv .env | |
44 source .env/bin/activate | |
45 pip install -r requirements.txt | |
46 ``` | |
47 | |
48 To enter the virtual-env the next times: | |
49 | |
50 ```bash | |
51 source .env/bin/activate | |
52 ``` | |
53 | |
54 Initializing a DB before tests | |
55 ----------------- | |
56 | |
57 ```bash | |
158
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
58 python Run.py --orthanc-path=/home/amazy/builds/orthanc-build-release/ --plugins-path=/home/amazy/builds/mysql-release/ --init --mysql-tiny |
156 | 59 ``` |
60 | |
61 Clearing a DB | |
62 ----------------- | |
63 | |
64 ```bash | |
158
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
65 python Run.py --orthanc-path=/home/amazy/builds/orthanc-build-release/ --plugins-path=/home/amazy/builds/mysql-release/ --clear --mysql-tiny |
156 | 66 ``` |
67 | |
158
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
68 Runing tests on multiple DBs |
156 | 69 ----------------- |
70 | |
71 ```bash | |
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/orthanc-build-release/ --run --pg9-tiny --pg10-tiny --pg11-tiny --mysql-tiny --sqlite-tiny --mssql-tiny |
159 | 73 |
74 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 | |
75 | |
156 | 76 ``` |