aurweb/docker/scripts
Kevin Morris 7bfc2bf9b4
fix(FastAPI): Improve sqlite testing speed
This commit adds a new Arch dependency: `libeatmydata`, which
provides the `eatmydata` executable that stubs out fsync() operations.
We use `eatmydata` to run our sharness and pytests in Docker now.

With `autocommit=True`, required by SQLAlchemy to keep the
session up to date with external DB modifications, many fsync
calls are used in the SQLite backend; especially because we're wiping
and creating records in every DB-bound test.

**Before:**

- mysql: 1m42s (elapsed during pytest run)
- sqlite: 3m06s (elapsed during pytest run)

**After:**

- mysql: 1m40s (elapsed during pytest run)
- sqlite: 1m50s (elapsed during pytest run)

Shout out to @klausenbusk, who suggested this as a possible fix,
and it was. Thanks, Kristian!

Closes #120

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-10-03 15:59:52 -07:00
..
install-deps.sh fix(FastAPI): Improve sqlite testing speed 2021-10-03 15:59:52 -07:00
install-python-deps.sh use Poetry to deal with deps and package install 2021-09-04 15:46:40 -07:00
run-cgit.sh Docker: Fix git sshd 2021-06-27 05:16:12 -07:00
run-fastapi.sh feat(Docker): allow custom certificates for fastapi/nginx 2021-10-02 13:27:19 -07:00
run-memcached.sh Docker: add service 'memcached' 2021-08-16 22:09:09 -07:00
run-nginx.sh Docker: add [c]git, nginx, fastapi, php-fpm, ca 2021-06-24 19:02:35 -07:00
run-php.sh Docker: add [c]git, nginx, fastapi, php-fpm, ca 2021-06-24 19:02:35 -07:00
run-pytests.sh fix(FastAPI): Improve sqlite testing speed 2021-10-03 15:59:52 -07:00
run-redis.sh docker-compose: add redis service 2021-08-17 19:58:26 -07:00
run-sharness.sh fix(FastAPI): Improve sqlite testing speed 2021-10-03 15:59:52 -07:00
run-smartgit.sh Docker: Fix git sshd 2021-06-27 05:16:12 -07:00
run-sshd.sh Docker: Fix git sshd 2021-06-27 05:16:12 -07:00
run-tests.sh Improve Docker ecosystem 2021-06-24 19:02:35 -07:00
setup-sqlite.sh Docker: add scripts/setup-sqlite.sh 2021-06-29 21:53:23 -07:00