Summary
Add a --only-regressions flag to filter diff output and display only functions whose performance has worsened between runs.
Problem
Current diff output includes both regressions and improvements, which introduces noise when the primary goal is to identify performance degradations. In real workflows—especially in CI or debugging regressions—developers typically care only about what got slower, not what improved.
Proposed Solution
Introduce a CLI flag:
oracletrace main.py --json new.json --compare base.json --only-regressions
Behavior:
- Filter out any functions where:
- execution time decreased
- no significant change occurred
- Only include functions where:
- Maintain existing sorting and formatting logic
- Ensure compatibility with other flags (e.g.,
--top, --sort)
Use Case
- Quickly identify performance regressions after a code change
- Reduce noise during manual analysis
- Integrate into CI pipelines where only regressions should be evaluated or surfaced
- Combine with
--fail-on-regression for automated checks
Example (optional)
oracletrace main.py --json new.json --compare base.json --only-regressions
▲ foo() +120ms (+30%)
▲ bar() +45ms (+12%)
Total regressions: 2
Alternatives Considered
- Adding a filter threshold (e.g.,
--min-delta)
→ Useful but does not replace the need to isolate regressions
Additional Context
- Can be extended in the future with thresholds (e.g., only regressions above X%)
- Minimal implementation: simple filter step before rendering output
Checklist
Summary
Add a
--only-regressionsflag to filter diff output and display only functions whose performance has worsened between runs.Problem
Current diff output includes both regressions and improvements, which introduces noise when the primary goal is to identify performance degradations. In real workflows—especially in CI or debugging regressions—developers typically care only about what got slower, not what improved.
Proposed Solution
Introduce a CLI flag:
Behavior:
new_time > base_time--top,--sort)Use Case
--fail-on-regressionfor automated checksExample (optional)
Alternatives Considered
--min-delta)→ Useful but does not replace the need to isolate regressions
Additional Context
Checklist