Skip to content

Conversation

kdvalin
Copy link
Member

@kdvalin kdvalin commented Aug 14, 2025

Description

This PR makes an attempt to use JSON schemas to validate proper results.

Before/After Comparison

Before

Results are either verified via regex or not verified at all

This is undesirable as regex is a bear to maintain

After

Results are verified using pydantic, which leverages JSON schemas.

Clerical Stuff

Mention the issue this PR works toward resolving. If the
PR completely solves the issue, use "This closes #x"
to close the issue out automatically.

Mention the JIRA ticket of the issue, this helps keep
everything together so we can find this PR easily.

Relates to JIRA: RPOPC-<TICKET_NUMBER>

@kdvalin kdvalin marked this pull request as draft August 14, 2025 16:00
@kdvalin kdvalin requested a review from a team August 16, 2025 01:57
This adds a validation schema for pyperf's output, this will allow us to
automatically verify the results.

Test - Doesn't matter what it is, so long as it is there
Avg - Average runtime of the test, floating point number > 0
Unit - Unit of the average runtime, can be sec, ms, us, ns

Co-developed-by: Cursor
This adds tests for the validation schema, so issues can be identified
before PRs are merged

Co-developed-by: Cursor
This adds a github action to verify that the validation unit tests
in this repo pass.  This will give us early alerts if a PR breaks the
validation process.

Co-developed-by: Cursor
This adds calls to test_tools-wrapper to convert the CSV results file to
JSON and then read that JSON file to verify it matches the provided
schema

Co-developed-by: Cursor
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.

1 participant