Skip to content

feat(M84): Endpoint Response Time Regression Detection - #182

Merged
hlin99 merged 1 commit into
mainfrom
feat/m84-latency-regression
Apr 6, 2026
Merged

hlin99 merged 1 commit into
mainfrom
feat/m84-latency-regression

Conversation

@hlin99

@hlin99 hlin99 commented Apr 6, 2026

Copy link
Copy Markdown
Member

Summary

Add xpyd-acc latency-regression subcommand that compares two benchmark JSON reports for statistically significant latency changes.

Features

  • latency_regression.py module: Welch's t-test, Cohen's d effect size, percentile comparison
  • CLI: xpyd-acc latency-regression --old <path> --new <path> --alpha <float> --json <path>
  • Verdict: faster/slower/unchanged based on statistical significance
  • Per-percentile comparison (p50, p95, p99)
  • Rich terminal output with latency table and effect size classification
  • Exit 0 if no regression, exit 1 if significant slowdown (CI-friendly)
  • Pure Python implementation (no scipy dependency)

Tests

26 tests covering Welch's t-test, Cohen's d, percentile computation, integration, formatting, JSON export, CLI integration.

Closes #181

- latency_regression.py: Welch's t-test, Cohen's d, percentile comparison
- CLI: xpyd-acc latency-regression --old/--new/--alpha/--json
- Exit 0 if no regression, exit 1 if significant slowdown
- Rich terminal output with latency table and verdict
- 26 tests covering statistics, integration, formatting, CLI

@hlin99-Review-Bot hlin99-Review-Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM. Clean Welch's t-test implementation with proper edge-case handling (small samples, zero variance). Good percentile reporting (p50/p95/p99). Tests are comprehensive — unit + integration + CLI. CI all green. current.md updated. Ship it.

@hlin99-Review-BotX hlin99-Review-BotX left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Clean Welch's t-test implementation with proper continued-fraction p-value approximation. Good edge-case handling (n<2, zero variance). Percentile reporting (p50/p95/p99), Cohen's d effect size, and CLI integration all solid. 268 lines of tests covering unit + integration + CLI. CI green. current.md updated. LGTM.

@hlin99
hlin99 merged commit 1784001 into main Apr 6, 2026
5 checks passed
@hlin99
hlin99 deleted the feat/m84-latency-regression branch April 6, 2026 06:42
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.

feat(M84): Endpoint Response Time Regression Detection

3 participants