tests: Add performance benchmarks for database initialization and app startup (#4367)

* feat: add benchmark markers to multiple test cases

* test: add performance tests for database initialization and app startup

Introduce benchmark tests to measure the performance of database initialization and application startup. This helps ensure efficiency and identify potential bottlenecks in the setup process.

* feat: update CodSpeed workflow to enhance test execution and duration tracking

* refactor: streamline performance tests for database initialization and app startup

* test: enhance app startup performance test with pytest benchmarking

* test: update benchmark for database initialization

Remove unnecessary benchmark call and simplify the database initialization test to enhance clarity and reliability in performance testing.

* chore: remove unnecessary pytest options from CodSpeed workflow

* Add environment setup for test_app_startup benchmark test

* Add benchmark test for app startup with database setup and flow loading

* Add benchmark markers to flow building tests in test_chat_endpoint.py

* perf: add benchmarks for service initialization and caching

Introduce benchmarks for various service initialization functions and LLM caching to improve performance evaluations.

* Remove unused benchmark marker from test function in test_chat_endpoint.py

* perf: initialize services in super user benchmark test

* Add benchmarking to test_create_starter_projects in performance tests

* Add asyncio threading to benchmark tests and remove benchmark fixture usage

* Remove database initialization benchmark test from performance suite
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-11-04 20:45:39 -03:00 committed by GitHub
commit cd3a7472c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 76 additions and 1 deletions

View file

@ -24,6 +24,9 @@ jobs:
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: make unit_tests args="--codspeed -n auto"
run: |
uv run pytest src/backend/tests \
--ignore=src/backend/tests/integration \
--codspeed
- name: Minimize uv cache
run: uv cache prune --ci