mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
docs/Databases/FerretDB/1/SpeedTest/speedtest.sh (build.sh and build.bat -> Tests -> Database speed test) is releases/db-conformance.sh with WEKAN_DB_SUITE=speedtest: the same FerretDB built from source and the same databases started the same way - SQLite, PostgreSQL, MySQL and MariaDB through FerretDB v1, MongoDB 6, 7, 8 and 9, and now FerretDB 2 with PostgreSQL and DocumentDB. data.cjs generates, deterministically, twice the users, boards, lists, swimlanes and cards of a production instance (615,070 cards), skewed the way real ones are; indexes.cjs creates the indexes WeKan creates, read from its ensureIndex calls; queries.cjs asks 18 common WeKan queries as WeKan's own code builds them; report.cjs writes Results.md - a row per database, fastest at the top, a column per query - and fails when a database answered or stored anything differently from MongoDB. README.md describes it, what it found, what was improved and what could still be. db-conformance.sh: WEKAN_DB_BACKENDS runs only the named databases (to repeat one into an earlier run's WEKAN_LOGDIR), containers are removed with their volumes, SQLite's data is under .tools/tmp, and FerretDB 2 is a backend of the speed test, and of the conformance run with WEKAN_CONFORMANCE_FERRETDB2=1. The conformance catalogue gains a case of writes by string _id and _ids differing only by case, which found that FerretDB on MariaDB 12.3 lost them. tests/dbSpeedTest.test.cjs checks the data, the index list, the queries, the report's order and that a difference fails it, the wiring and the Due Cards board scope. Thanks to xet7 !
20 lines
936 B
Bash
Executable File
20 lines
936 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# The WeKan database speed test: every database this CPU runs, one at a time,
|
|
# loaded with the same dummy WeKan data and asked the same common WeKan queries.
|
|
# Writes Results.md beside this script. See README.md.
|
|
#
|
|
# docs/Databases/FerretDB/1/SpeedTest/speedtest.sh
|
|
#
|
|
# It is releases/db-conformance.sh with WEKAN_DB_SUITE=speedtest: the same
|
|
# FerretDB built from source, the same databases started the same way, the same
|
|
# ports and the same log directory - only what is run against each differs.
|
|
#
|
|
# WEKAN_SPEEDTEST_SCALE=2 data size: 2 = twice a production WeKan
|
|
# WEKAN_SPEEDTEST_BUDGET_MS=10000 how long one query keeps being repeated
|
|
# WEKAN_SPEEDTEST_RESULTS=... where Results.md is written
|
|
# WEKAN_CONFORMANCE_HANA=1 include SAP HANA (amd64, ~16 GB RAM)
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/../../../../.."
|
|
export WEKAN_DB_SUITE=speedtest
|
|
exec ./releases/db-conformance.sh "$@"
|