2
0
Fork 0
mirror of https://gitlab.com/koha-community/koha-misc4dev.git synced 2025-02-09 13:59:43 +00:00
No description
Find a file
2025-01-26 14:53:30 +01:00
benchmark_data/Joubu Add benchmark script and data 2016-12-27 14:09:42 +00:00
data/sql Issue #84 : Fix 100$a length on 10 UNIMARC records 2025-01-26 14:53:30 +01:00
AUTHORS Add LICENSE and AUTHORS files 2016-12-27 14:32:19 +00:00
benchmark_them_all.pl Replace OPAC in psgi 2017-01-12 11:25:38 +01:00
collect_benchmark_data.pl Add LICENSE and AUTHORS files 2016-12-27 14:32:19 +00:00
cp_debian_files.pl Issue #79: Copy Zebra DOM indexing configuration files 2024-10-22 10:43:30 +02:00
cp_zebra_files.pl Issue #79: Copy Zebra DOM indexing configuration files 2024-10-22 10:43:30 +02:00
create_superlibrarian.pl Issue #29 - Support for UNIMARC 2020-03-12 10:53:53 +01:00
custom-sample.sql Issue #36 - Add the ability to launch a custom SQL file 2019-12-03 10:45:12 +00:00
do_all_you_can_do.pl Issue #79: Copy Zebra DOM indexing configuration files 2024-10-22 10:43:30 +02:00
insert_data.pl Issue #80: Change language syspref to StaffInterfaceLanguages 2024-11-07 09:58:03 +00:00
koha_schema_to_openapi.pl Issue #1: POD fixes 2018-05-17 13:46:03 -03:00
LICENSE Add LICENSE and AUTHORS files 2016-12-27 14:32:19 +00:00
populate_db.pl Issue #61 - Do not use DB if none exists yet 2024-10-01 09:07:37 +00:00
README.md Issue #69 - Update README 2024-10-01 09:05:58 +00:00
reset_plack.pl Issue #25: Make reset_plack.pl configurable 2018-09-16 12:25:07 -07:00
run_tests.pl Issue #83: Generate a junit output in case of success 2024-11-27 11:29:20 +01:00
setup_sip.pl Issue #35 - Enable sip before starting it 2020-04-21 12:19:55 +02:00

Koha misc4dev

Create a handy kit for Koha developpers (https://koha-community.org).

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?

If you do not know what they are, do not use them.

They are mostly used internally by koha-testing-docker and so our CI (jenkins), see http://wiki.koha-community.org/wiki/Developer_handbook first, then https://gitlab.com/koha-community/koha-testing-docker/

How to use it

You want to fill your existing database

As the root 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 root 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 /kohadevbox/misc4dev/do_all_you_can_do.pl'

% reset_my_db

If you are inside a koha-testing-docker container you should use the reset_all alias instead.

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 root 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