Skip to content

add punkreq dependency and implement performance tests for publish API - #18

Merged
grillazz merged 1 commit into
mainfrom
17-performance-test-with-ingres-layer
Aug 8, 2026
Merged

add punkreq dependency and implement performance tests for publish API#18
grillazz merged 1 commit into
mainfrom
17-performance-test-with-ingres-layer

Conversation

@grillazz

@grillazz grillazz commented Aug 8, 2026

Copy link
Copy Markdown
Owner

No description provided.

@grillazz
grillazz requested a lite review from Copilot August 8, 2026 16:05
@grillazz grillazz self-assigned this Aug 8, 2026
@grillazz grillazz linked an issue Aug 8, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an HTTP client dependency and introduces pytest-based checks intended to exercise the /publish FastAPI endpoint, including a sustained-throughput test.

Changes:

  • Add punkreq as a dependency and update uv.lock accordingly.
  • Add a new dev dependency group with pytest.
  • Introduce async pytest tests that call the running /publish API, including a 10-second sustained load loop.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
uv.lock Locks new runtime/dev dependencies (punkreq, pytest, and transitive deps).
tests/test_publish_api.py Adds async integration/performance-style tests targeting /publish.
pyproject.toml Adds punkreq to runtime deps and introduces a dev dependency group with pytest.
Suppressed comments (1)

tests/test_publish_api.py:19

  • This is a 10-second sustained load test in the normal pytest suite, and will make pytest slow/flaky (and still requires an externally running API). It should be skipped by default unless explicitly enabled (or moved under a separate perf/bench harness).
@pytest.mark.anyio
async def test_publish_sustained_maximum_speed_for_10_seconds():
    duration = 10.0
    async with Client(base_url="http://0.0.0.0:8080") as client:
        start = time.perf_counter()

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pyproject.toml
Comment on lines 10 to 14
dependencies = [
"fastapi[all]>=0.141.1",
"faust-streaming[ckafka,fast]==0.13.0",
"punkreq>=0.1.1",
"ruff>=0.16.1",
Comment thread tests/test_publish_api.py
Comment on lines +9 to +12
async def test_publish():
async with Client(base_url="http://0.0.0.0:8080") as client:
response = await client.post("/publish", json={"message": f"random: {random.random()!s}"})
response.raise_for_status()
@grillazz
grillazz merged commit eb68285 into main Aug 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

performance test with ingres layer ;)

2 participants