Summary
Add support for automatically retrieving a baseline trace from a Git branch or a specific Git commit.
Proposed flags:
oracletrace app.py --get-baseline-from-branch main
oracletrace app.py --get-baseline-from-commit a1b2c3d
Problem
Today, performance comparisons require manually generating, storing, and providing baseline JSON files.
Typical CI workflows require additional scripting to:
- Checkout a reference branch or commit.
- Generate a baseline trace.
- Store the generated JSON artifact.
- Restore it later for comparison.
This introduces operational overhead and makes regression detection harder to adopt.
Proposed Solution
Allow OracleTrace to automatically obtain a baseline from Git history.
Branch mode
oracletrace app.py --get-baseline-from-branch main
Workflow:
- Resolve the latest commit from the specified branch.
- Locate a previously generated OracleTrace baseline associated with that commit.
- Use it as the comparison baseline.
Commit mode
oracletrace app.py --get-baseline-from-commit a1b2c3d
Workflow:
- Resolve the specified commit.
- Locate a baseline associated with that commit.
- Use it for comparison.
Internally this could integrate with:
- Local cache directory
- CI artifacts
- Future remote baseline storage backends
Example
Current workflow:
oracletrace app.py --json baseline.json
oracletrace app.py \
--json current.json \
--compare baseline.json
Desired workflow:
oracletrace app.py \
--get-baseline-from-branch main \
--fail-on-regression \
--threshold 10
or
oracletrace app.py \
--get-baseline-from-commit a1b2c3d \
--fail-on-regression \
--threshold 10
Use Case
Pull Request validation
A CI pipeline could automatically compare a feature branch against the latest baseline generated on main.
oracletrace app.py \
--get-baseline-from-branch main \
--fail-on-regression
Historical regression investigation
Developers could compare performance against a known-good commit.
oracletrace app.py \
--get-baseline-from-commit a1b2c3d
Alternatives Considered
- Continue managing baseline files manually.
- Store baseline paths in CI configuration.
- Use external scripts to fetch historical baselines before running OracleTrace.
Open Questions
- Where should baselines be stored and indexed?
- Local cache
- GitHub Actions artifacts
- Dedicated remote storage
- Should OracleTrace generate the baseline automatically if one does not exist?
- How should branch names map to baseline artifacts?
Additional Context
This feature would significantly improve CI/CD integration by reducing manual baseline management and enabling Git-native performance comparisons.
Checklist
Summary
Add support for automatically retrieving a baseline trace from a Git branch or a specific Git commit.
Proposed flags:
Problem
Today, performance comparisons require manually generating, storing, and providing baseline JSON files.
Typical CI workflows require additional scripting to:
This introduces operational overhead and makes regression detection harder to adopt.
Proposed Solution
Allow OracleTrace to automatically obtain a baseline from Git history.
Branch mode
Workflow:
Commit mode
Workflow:
Internally this could integrate with:
Example
Current workflow:
Desired workflow:
or
Use Case
Pull Request validation
A CI pipeline could automatically compare a feature branch against the latest baseline generated on
main.Historical regression investigation
Developers could compare performance against a known-good commit.
Alternatives Considered
Open Questions
Additional Context
This feature would significantly improve CI/CD integration by reducing manual baseline management and enabling Git-native performance comparisons.
Checklist