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 43d9af9511 Issue #53 - Rename gist with TaxRates 3 months ago
benchmark_data/Joubu Add benchmark script and data 5 years ago
data/sql Issue #50 - Do not display DB errors 10 months ago
AUTHORS Add LICENSE and AUTHORS files 5 years ago
LICENSE Add LICENSE and AUTHORS files 5 years ago
README.md Minor typo, to test jenkins integration 2 years ago
benchmark_them_all.pl Replace OPAC in psgi 5 years ago
collect_benchmark_data.pl Add LICENSE and AUTHORS files 5 years ago
cp_debian_files.pl Issue #43 - chown kohadev-koha on /etc/koha/sites after the files have been copied 10 months ago
create_superlibrarian.pl Issue #29 - Support for UNIMARC 1 year ago
custom-sample.sql Issue #36 - Add the ability to launch a custom SQL file 2 years ago
do_all_you_can_do.pl Issue #44 - (follow-up) Does not hardcode the instance name 1 year ago
insert_data.pl Issue #53 - Rename gist with TaxRates 3 months ago
koha_schema_to_openapi.pl Issue #1: POD fixes 3 years ago
populate_db.pl Issue #52 - Prevent SQL errors to stop the reset_all process 6 months ago
reset_plack.pl Issue #25: Make reset_plack.pl configurable 3 years ago
setup_sip.pl Issue #35 - Enable sip before starting it 1 year ago

README.md

Koha misc4dev

Create an handy kit for Koha developpers (http://koha-community.org). 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 http://wiki.koha-community.org/wiki/Developer_handbook first, then https://github.com/digibib/kohadevbox

How to use it

You want to fill your existing database

As the vagrant user

% perl do_all_you_can_do.pl

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/do_all_you_can_do.pl'

% 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 https://github.com/joubu/Koha.git 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/basic_workflow.pl 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 https://github.com/joubu/Koha.git

Configure Selenium and install firefox

% sudo wget https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.0.jar -O /opt/selenium-server-standalone-2.53.0.jar

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

% echo "deb http://packages.linuxmint.com debian import" | sudo tee /etc/apt/sources.list.d/firefox.list

% apt update && apt install firefox xvfb

Benchmark!

Start the selenium server

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

% DISPLAY=:1 java -jar $SELENIUM_PATH

Launch the benchmark script

% perl koha-misc4dev/benchmark_them_all.pl # 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/collect_benchmark_data.pl /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