Test tools, verification and some bug fixes#66
Conversation
Caps the setuptools version on pyperformance versions <=1.11.0. This is due to setuptools removing `pkg_resources` which breaks the chameleon benchmark in that pyperformance range.
Exit based off verification return code, if it's a no-op it would return 0. This also moves the writing of /tmp/pyperf.out to an `exec` instead of trying to figure it out via tee/shell redirection. This removes a recursive call to the wrapper.
|
This relates to RPOPC-835 |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||||||||||||||
PR Code Suggestions ✨Latest suggestions up to f676b26
Previous suggestions✅ Suggestions up to commit ef093e4
✅ Suggestions up to commit 7c193c8
✅ Suggestions up to commit a456bd3
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Remove venv sourcing and use the pip binary directly. Use sed for cleaning up the path
Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com>
Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com>
User description
Description
This PR does a couple things
$HOME/test_toolswhich is a well known location we are standardizing onBefore/After Comparison
Before
Test tools would end up at the pwd of the calling shell.
CSVs would not be verified, resulting in possible garbage output
Chameleon would not run
After
Test tools will reside at
$HOME/test_toolsCSVs are verified, ensuring that garbage does not land into the output
Chameleon runs again.
Clerical Stuff
Closes #65 and #63
Relates to JIRA: RPOPC-835
Relates to JIRA: RPOPC-823
Supporting files
pyperf.log
pyperf_out_2026.02.17-16.25.31.csv
PR Type
Enhancement, Bug fix
Description
Standardize test_tools location to
$HOME/test_toolsenvironment variableAdd CSV verification with schema validation and proper exit codes
Fix chameleon benchmark by capping setuptools version for pyperformance <=1.11.0
Refactor output handling to use exec redirection instead of recursive calls
Diagram Walkthrough
File Walkthrough
pyperf_run
Standardize paths, add verification, fix setuptoolspyperf/pyperf_run
test_toolsreferences with$TOOLS_BINenvironmentvariable pointing to
$HOME/test_toolssetup_pyperformance()function to cap setuptools at v81.0.0 forpyperformance versions <=1.11.0
csv_to_jsonandverify_resultstoolswith schema validation
approach
rtcvariable to final exitpyperf_schema.py
Add pydantic schema for results validationpyperf_schema.py
results validation
TestNamesenum with all supported benchmark namesDurationUnitsenum for time measurement unitsPyperfResultsmodel with required fields: Test, Avg, Unit,Start_Date, End_Date