-
Notifications
You must be signed in to change notification settings - Fork 1
Bugfix/config benchmark lockfile types #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a69b220
addressed issue_01-issue_04
henry0816191 79640e8
added probe-performance
henry0816191 b279907
added uv
henry0816191 654af7e
fixed lint error
henry0816191 33dec6d
addressed ai review result
henry0816191 34002d9
addressed ai review results
henry0816191 82a7238
fixed lint errors
henry0816191 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: pip | ||
| - package-ecosystem: uv | ||
| directory: / | ||
| schedule: | ||
| interval: weekly | ||
|
|
||
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "wall_seconds_median": 0.0243, | ||
| "regression_threshold_pct": 20, | ||
| "min_request_count": 6 | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| """Pytest configuration for probe-cycle benchmarks (not collected with default ``tests/``).""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import os | ||
| import sys | ||
| from pathlib import Path | ||
|
|
||
| # Benchmarks do not load ``tests/conftest.py``; mirror slack/test env so ``paperscout.config`` can import. | ||
| os.environ.setdefault("_PAPERSCOUT_TESTING", "1") | ||
| os.environ.setdefault("SLACK_BOT_TOKEN", "xoxb-benchmark") | ||
| os.environ.setdefault("SLACK_SIGNING_SECRET", "benchmark-secret") | ||
|
|
||
| import pytest | ||
|
|
||
| # Repo root so ``from tests.conftest import ...`` resolves when only ``benchmarks/`` is targeted. | ||
| _ROOT = Path(__file__).resolve().parents[1] | ||
| if str(_ROOT) not in sys.path: | ||
| sys.path.insert(0, str(_ROOT)) | ||
|
|
||
|
|
||
| def pytest_addoption(parser): | ||
| parser.addoption( | ||
| "--bench-http-concurrency", | ||
| type=int, | ||
| default=5, | ||
| help="HTTP concurrency cap for ISOProber during benchmark (maps to Settings.http_concurrency).", | ||
| ) | ||
| parser.addoption( | ||
| "--bench-poll-interval-minutes", | ||
| type=int, | ||
| default=30, | ||
| help="Settings.poll_interval_minutes (recorded in metrics; scheduler not exercised here).", | ||
| ) | ||
| parser.addoption( | ||
| "--bench-per-request-delay-ms", | ||
| type=float, | ||
| default=0.15, | ||
| help="Simulated server delay per HEAD/GET in the mock transport (milliseconds).", | ||
| ) | ||
|
|
||
|
|
||
| def pytest_configure(config): | ||
| if config.getoption("--bench-http-concurrency") <= 0: | ||
| raise pytest.UsageError("--bench-http-concurrency must be positive") | ||
| if config.getoption("--bench-poll-interval-minutes") <= 0: | ||
| raise pytest.UsageError("--bench-poll-interval-minutes must be positive") | ||
| if config.getoption("--bench-per-request-delay-ms") < 0: | ||
| raise pytest.UsageError("--bench-per-request-delay-ms must be non-negative") | ||
| config.addinivalue_line( | ||
| "markers", | ||
| "benchmark: probe cycle performance / regression (run via ``pytest benchmarks/ -m benchmark``).", | ||
| ) | ||
|
henry0816191 marked this conversation as resolved.
|
||
|
|
||
|
|
||
| @pytest.fixture | ||
| def fake_pool(): | ||
| """Fresh in-memory pool (same as ``tests/conftest``).""" | ||
| from tests.conftest import FakePool | ||
|
|
||
| return FakePool() | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.