Repository navigation
Testy: -n auto wg RAM-u przez plugin pytest-xdist-memory - #970
Draft
mpasternak wants to merge 2 commits into
Draft
mpasternak wants to merge 2 commits into
mpasternak wants to merge 2 commits into
Conversation
bin/xdist_workers.py (osobny pomiar `make xdist-measure` + liczenie -n w Makefile) zastępuje plugin pytest-xdist-memory: każdy przebieg `make tests-*` poza CI mierzy szczyt pamięci workera (poddrzewo procesów: Chromium, Daphne; kontener PG po porcie z DJANGO_BPP_DB_PORT), zapisuje go w .pytest-xdist-memory.json osobno dla każdego `-m`, a `-n auto` bierze tyle workerów, ile mieści się w wolnym RAM-ie. - XDIST_N / PLAYWRIGHT_WORKERS poza CI = auto + XDIST_MEMORY (`--xdist-memory`, dla Playwrighta limit do rdzeni wydajnościowych i domyślnie 1900 MB/worker przed pierwszym pomiarem); - strażnik systemd-run przeniesiony do bin/memory_guard.sh; bez niego (macOS) włączany jest watchdog pluginu; - usunięte targety xdist-measure/xdist-calc(-playwright). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Co
bin/xdist_workers.py(osobny pomiar przezmake xdist-measure+ liczenie-nw Makefile) zastępuje plugin pytest-xdist-memory:make tests-*poza CI mierzy szczyt pamięci workera razem z poddrzewem procesów (Chromium, Daphne) i kontenerem PG. Kontener jest wskazywany po porcie zDJANGO_BPP_DB_PORT, bo nazwy testcontainers mają losowy sufiks, a równoległe worktree mają podobne;.pytest-xdist-memory.json(gitignored), osobno dla każdego wyrażenia-m;-n autobierze tyle workerów, ile mieści się w aktualnie wolnym RAM-ie. Profil nie wymaga już osobnego pomiaru i się nie starzeje.Makefile:
XDIST_N/PLAYWRIGHT_WORKERSpoza CI =auto+XDIST_MEMORY(--xdist-memory; dla Playwrighta--xdist-memory-performance-coresi 1900 MB na workera przed pierwszym pomiarem). CI bez zmian;systemd-run MemoryMaxprzeniesiony dobin/memory_guard.sh. Bez niego (macOS) włącza się watchdog pluginu;xdist-measure/xdist-calc(-playwright).Weryfikacja (thinkpad14s, lokalnie z pluginem z checkoutu)
Polecenia jak z Makefile'a, na próbkach:
-m "not playwright"(test_models + test_admin): 1384 passed;-n autoz wartości domyślnych → 3 workery; zmierzone: worker 457 MB, PG 159 MB na workera → następne-n auto= 4;-m playwright(integration_tests + test_playwright/test_admin): 150 passed; worker 1560 MB, PG 971 MB na workera (przy 1 workerze cały kontener przypada na niego, więc wartość jest ostrożna).CI=1 make -n …→ bez pluginu i bez guarda, jak dotąd.🤖 Generated with Claude Code