Feat/12053 binary search v3#6
Conversation
|
Look if it is possible to extract Test_run class to a seperate file to remove duplicates? Opinion wanted |
|
@Davihan11 After the merge of @matyas7dub work, a more severe rebase will be needed. |
|
I also requested Copilot's review. You can evaluate its feedback as necessary; do not take it as "a must". Reject/comment on it if irrelevant. |
There was a problem hiding this comment.
Pull request overview
This PR introduces an automated binary-search mode to find the maximum throughput multiplier that stays under a target drop-rate, wiring it into the test harness via new CLI/pytest options and refactoring several tests to use a callable “runner” object.
Changes:
- Add
util/search_util.pywith the binary search loop that repeatedly runs a test and evaluates drop rate. - Add
get_drop_rate()inutil/suri_util.pyto compute drop rate from the latestresults/artefacts/**/aggregated.json. - Add pytest options/fixtures (
conftest.py) and script args (pytest_start.sh) to configure binary-search parameters; refactor multiple tests to support binary-search execution.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| util/suri_util.py | Adds get_drop_rate() that derives drop rate from the latest aggregated results. |
| util/search_util.py | Introduces binary search driver and evaluation function used by tests. |
| conftest.py | Adds CLI options and fixtures for binary-search parameters. |
| pytest_start.sh | Adds shell argument parsing and forwards binary-search args to pytest. |
| tests/trex_one_port/test_trex_one_port.py | Adds binary-search mode and refactors run logic into a helper class. |
| tests/nfs_smb_simple/test_nfs_smb_simple.py | Same refactor + binary-search integration. |
| tests/https_simple/test_https_simple.py | Same refactor + binary-search integration. |
| tests/http_simple/test_http_simple.py | Same refactor + binary-search integration. |
| tests/http_https_smb_simple/test_http_https_smb_simple.py | Same refactor + binary-search integration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Can you highlight the duplicates? Or perhaps the recent @matyas7dub work addressed that? |
I am talking about the class Test_run, where I have 4 of them with the only difference between them being the profile creation. |
One approach could be through python subclasses (similar to how |
If I recall when we were discussing test_settings.json, I recall that we decided that the tests should be independent of each other. For that reason, I will not be putting them together. |
Added binary search algorithm
Added binary search algorithm for more automatic way of searching maximum allowed multiplier for any given test. These changes also included more refactoring of test.py files.
Changes