You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jonathan Druart 19c6dc528b Issue #71 - SearchEngine should be Zebra 3 months ago
benchmark_data/Joubu Add benchmark script and data 7 years ago
data/sql Issue #71 - SearchEngine should be Zebra 3 months ago
AUTHORS Add LICENSE and AUTHORS files 7 years ago
LICENSE Add LICENSE and AUTHORS files 7 years ago Minor typo, to test jenkins integration 5 years ago Replace OPAC in psgi 7 years ago Add LICENSE and AUTHORS files 7 years ago Issue #43 - chown kohadev-koha on /etc/koha/sites after the files have been copied 3 years ago Issue #29 - Support for UNIMARC 4 years ago
custom-sample.sql Issue #36 - Add the ability to launch a custom SQL file 4 years ago Issue #60 - Use full path to grep on package.json 10 months ago Issue #73 - Update vendor data 3 months ago Issue #1: POD fixes 6 years ago Issue 55 - Remove "subroutine kohaversion redefined" warning 1 year ago Issue #25: Make configurable 5 years ago Issue #72 - Add flag run-db-upgrade-only 3 months ago Issue #35 - Enable sip before starting it 4 years ago

Koha misc4dev

Create an handy kit for Koha developpers ( In a first time it will provide scripts to fill the DB with useful data.

This project does not have the aim to grow much.

Why this is not in the Koha codebase?

The Koha community does not have enough people to test patches. Developpers need handy tools to make their everyday works and do not want to wait for people to be interested in what they need.

Who should not use these scripts?

You should not use these script if you are not running into a devbox. If you do not know what is kohadevbox, you should not start from here, see first, then

How to use it

You want to fill your existing database

As the vagrant user

% perl

You want to reset your database

Note that this is very useful if you want to git bisect

As the vagrant user

% alias reset_my_db='mysql -u koha_kohadev -ppassword -e"DROP DATABASE koha_kohadev";mysql -u koha_kohadev -ppassword -e"CREATE DATABASE koha_kohadev";perl /home/vagrant/koha-dev-misc/'

% reset_my_db

You want to benchmark Koha

You can compare Koha versions 3.14, 3.16, 3.18, 3.20, 3.22, 16.05 and 16.11.

A new branch perf_${version}.x has been pushed to my Koha github repository. On top of the stable versions, a new commit "wip perfs ${version}.x" adds and or adapts the selenium script for the branches it is missing, and a new "search" step has been added to the selenium script.

To benchmark Koha using the t/db_dependent/selenium/ script, you need to do the following steps:

Add the Joubu's Koha git repository

As the vagrant user

% cd kohaclone % git remote add Joubu

Configure Selenium and install firefox

% sudo wget -O /opt/selenium-server-standalone-2.53.0.jar

% SELENIUM_PATH=/opt/selenium-server-standalone-2.53.0.jar

% echo "deb debian import" | sudo tee /etc/apt/sources.list.d/firefox.list

% apt update && apt install firefox xvfb


Start the selenium server

% Xvfb :1 -screen 0 1024x768x24 2>&1 >/dev/null &


Launch the benchmark script

% perl koha-misc4dev/ # That will take a while, almost 1h on my laptop

Note that you can set a verbose flag (edit the script and set $verbose = 1)

The performance data have been created into /tmp/${version}[_plack].txt

The _plack files are only generated if the debian/templates/koha.psgi file exists (from 3.22)

Collect the data

% perl koha-misc4dev/ /tmp/3.14.txt /tmp/3.16.txt /tmp/3.18.txt /tmp/3.20.txt /tmp/3.22.txt /tmp/3.22_plack.txt /tmp/16.05.txt /tmp/16.05_plack.txt /tmp/16.11.txt /tmp/16.11_plack.txt # Yes this could be improved

That will produce 2 sections, the "Raw data" (not really useful) and the "Average".

You can have a look at my own generated file in the benchmark_data directory.

Generate a graph

To generate a graph, copy and paste the "Average" section into a spreadsheet program (Calc for instance).

You can take a look at my generated graph in benchmark_data/Joubu/results.ods