API Load Tests#703
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a built-in HTTP/API load-testing capability to generated Aegis Stack projects, including a CLI workflow, Redis-backed result persistence, backend endpoints for reading stored results, and a new dashboard tab for viewing recent runs. This fits into the existing “load test” space by complementing the worker/queue load tests with an endpoint-focused runner.
Changes:
- Introduces
api-load-testCLI commands (list/run/recent/results) backed by anhttpx-basedAPILoadTestService, with optional Redis persistence. - Adds shared load-test infrastructure (
commonmodels/analysis/storage) plus FastAPI route discovery and HTTP-specific models. - Surfaces stored run results via backend API endpoints and a new “Load Tests” tab in the frontend dashboard; updates docs and MkDocs navigation.
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| mkdocs.yml | Adds new backend docs page to site navigation. |
| docs/components/backend/load-testing.md | New docs page describing built-in API load testing for the repo docs site. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/tests/test_formatting.py | Adds unit tests for shared format_relative_time helper. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/tests/services/test_load_test_common.py | Adds contract/unit tests for shared load-test models, analysis helpers, and Redis storage. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/tests/services/test_api_load_test_service.py | Adds unit tests for the HTTP load-test orchestrator service behavior. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/tests/services/test_api_load_test_models.py | Adds unit tests for HTTP load-test Pydantic models. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/tests/services/test_api_load_test_discovery.py | Adds tests for FastAPI route discovery and auth/path-param detection. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/tests/cli/test_api_load_test_cli.py | Adds CLI tests for list/run/recent/results commands and flags. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/tests/api/test_load_test_api_endpoints.py.jinja | Adds API endpoint tests for reading stored HTTP load-test results (templated for auth/no-auth stacks). |
| aegis/templates/copier-aegis-project/{{ project_slug }}/mkdocs.yml.jinja | Adds generated-project docs nav entry for API load testing. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/docs/components/api-load-testing.md | New generated-project documentation for API load testing usage. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/services/load_test/worker/service.py | Updates worker load-test service imports to the new package structure. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/services/load_test/worker/models.py | Moves/defines worker load-test models under the new package path. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/services/load_test/worker/init.py | Initializes worker load-test subpackage. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/services/load_test/common/storage.py | Adds shared Redis result storage for load-test variants. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/services/load_test/common/models.py | Adds shared base Pydantic models for load-test configs/metrics/results/analysis. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/services/load_test/common/analysis.py | Adds shared rating/recommendation helpers for load-test analysis. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/services/load_test/common/init.py | Initializes shared common subpackage. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/services/load_test/api/service.py | Implements concurrent HTTP load-test orchestrator with in-process/out-of-process modes. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/services/load_test/api/models.py | Adds HTTP load-test configuration/metrics/result models and route info model. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/services/load_test/api/discovery.py | Implements FastAPI route discovery + auth dependency detection + path param extraction. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/services/load_test/api/init.py | Initializes HTTP load-test subpackage. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/services/load_test/init.py.jinja | Adds load-test package initializer/re-export surface for back-compat (templated). |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/services/load_test_models.py | Converts legacy load_test_models module into a back-compat re-export shim. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/core/formatting.py | Adds shared format_relative_time utility for CLI/frontend time display. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/components/frontend/dashboard/modals/observability_modal.py | Switches timestamp formatting to shared format_relative_time. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/components/frontend/dashboard/modals/modal_sections.py | Updates modal utilities commentary to point to shared relative-time formatting. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/components/frontend/dashboard/modals/load_tests_tab.py | Adds a new dashboard tab to view recent API load test runs. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/components/frontend/dashboard/modals/backend_modal.py | Registers the new “Load Tests” tab and replaces method badge rendering with reusable control. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/components/frontend/controls/method_badge.py | Adds reusable HTTP method badge control for consistent styling. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/components/frontend/controls/data_table.py | Fixes cell alignment default to avoid stretching pill-shaped controls in table cells. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/components/frontend/controls/init.py | Re-exports new MethodBadge and method color mapping. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/components/backend/api/routing.py.jinja | Wires new load-test API router into the backend API. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/components/backend/api/load_test_api.py.jinja | Adds backend endpoints to list/get stored API load-test results (Redis-backed, auth-gated when enabled). |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/cli/main.py.jinja | Registers new api-load-test Typer subcommand in the project CLI. |
| aegis/templates/copier-aegis-project/{{ project_slug }}/app/cli/api_load_test.py | Implements the api-load-test CLI group (list/run/recent/results) with Rich output and optional Redis persistence. |
5084bcd to
8ec08d6
Compare
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.
No description provided.