Files
andros 80a0cebb63 Switch to Uvicorn and automate benchmark with Playwright in Docker
Server: replace Daphne with Uvicorn across Dockerfile, compose.yaml,
requirements.txt and INSTALLED_APPS. Uvicorn with the websockets worker
is noticeably faster for the pure-Python frameworks in this repo.

Benchmark: rewrite run_performance_tests.py as a real Playwright-driven
harness. Add a bench service (Dockerfile.bench + compose profile) that
runs headless Chromium against the web container, wipes the DB between
implementations via /_bench/clear/, discards two warmup iterations, then
measures 10 real iterations per framework. HTTP bodies are captured via
response.body(); WebSocket frames via page.on("websocket").

Visualization: new generate_plotly_plots.py emits the four comparison
PNGs with Plotly + Kaleido. The stale compile_performance_data.py
(hard-coded fake data) and the matplotlib script it fed are removed.

Cleanup: .gitignore now excludes performance_results_*.csv and logs/;
prior measurement CSVs and obsolete plot variants have been deleted.

README: describe the new Docker-only workflow and drop the outdated
manual-DevTools section.
2026-04-14 09:40:15 +02:00

10 lines
255 B
Docker

FROM mcr.microsoft.com/playwright/python:v1.47.0-jammy
WORKDIR /bench
RUN pip install --no-cache-dir playwright==1.47.0 plotly==5.24.1 kaleido==0.2.1
COPY run_performance_tests.py generate_plotly_plots.py ./
CMD ["python", "run_performance_tests.py"]