Skip to content

Reduce CI noise sensitivity in daily CLI performance benchmarks - #53777

Merged
pelikhan merged 3 commits into
mainfrom
copilot/performance-regression-investigation
Aug 18, 2026
Merged

Reduce CI noise sensitivity in daily CLI performance benchmarks#53777
pelikhan merged 3 commits into
mainfrom
copilot/performance-regression-investigation

Conversation

Copilot AI commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

The daily performance workflow reported 33%–328% "regressions" across unrelated micro-benchmarks (e.g. ExtractWorkflowNameFromFile, a filename parse) with no plausible shared code path. Root cause is measurement methodology, not code: bench-performance ran each benchmark 3 times and compared against a mean baseline, so a single busy shared runner produces large phantom deltas.

Makefile: bench-performance

  • -benchtime=3x-benchtime=2s for the workflow benchmarks, and 1s2s for the CLI helpers.
  • Sample count per benchmark goes from 3 to ~670–126,000 depending on the benchmark; wall clock stays ~40s.

daily-cli-performance.md: noise-resistant trend analysis

  • Baseline switched from mean to median of the last 7 data points, so one bad historical run no longer moves the comparison target.
  • New likely_environment_noise signal: set when ≥3 benchmarks regress and regressions+warnings cover ≥50% of tracked benchmarks — broad simultaneous slowdown across unrelated code is a runner symptom, not a code symptom.
likely_noise = (
    regressions >= NOISE_MIN_REGRESSIONS      # 3
    and total > 0
    and degraded / total >= NOISE_REGRESSION_RATIO  # 0.5, regressions + warnings
)

When flagged, regressions.json is emitted empty and the agent is instructed to report the noise and recommend a re-run instead of filing per-benchmark issues. Isolated regressions (1–2 benchmarks) still file issues as before.

Not changed

The 2026-07-06 → 2026-08-18 history gap is expected: pre_activation skips the run unless go.mod, go.sum, Makefile, pkg, or cmd changed in the prior 24h. The skip logic is working as designed.

daily-cli-performance.lock.yml recompiled.

Copilot AI and others added 2 commits August 18, 2026 18:00
…nment-noise guard

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate performance regression pattern and environmental factors Reduce CI noise sensitivity in daily CLI performance benchmarks Aug 18, 2026
Copilot AI requested a review from pelikhan August 18, 2026 18:07
@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

  • Category: chore
  • Risk: low
  • Priority score: 33/100 (impact 15, urgency 8, quality 10)
  • Recommended action: defer

Draft PR reducing CI benchmark noise sensitivity. Low risk, small diff. Needs undraft before scheduling review.

Generated by 🔧 PR Triage Agent · auto · 45 AIC · ⌖ 2.09 AIC · ⊞ 8.3K ·

@pelikhan
pelikhan marked this pull request as ready for review August 18, 2026 19:28
Copilot AI balanced review requested due to automatic review settings August 18, 2026 19:28
@pelikhan
pelikhan merged commit 726b395 into main Aug 18, 2026
@pelikhan
pelikhan deleted the copilot/performance-regression-investigation branch August 18, 2026 19:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Improves daily CLI benchmark stability and reduces false regression alerts.

Changes:

  • Uses time-based benchmark sampling.
  • Switches historical baseline to median.
  • Adds environment-noise detection and suppresses related issues.
Show a summary per file
File Description
Makefile Increases benchmark sampling duration.
.github/workflows/daily-cli-performance.md Adds median baselines and noise classification.
.github/workflows/daily-cli-performance.lock.yml Updates generated workflow metadata.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 3/3 changed files
  • Comments generated: 4
  • Review effort level: Balanced

Comment on lines 364 to +365
recent_history = historical_values[-7:] if len(historical_values) >= 7 else historical_values
avg_historical = sum(recent_history) / len(recent_history)
avg_historical = statistics.median(recent_history)
Comment on lines +433 to +436
likely_noise = (
regressions >= NOISE_MIN_REGRESSIONS
and total > 0
and degraded / total >= NOISE_REGRESSION_RATIO
Comment on lines +560 to +565
if analysis['summary'].get('likely_environment_noise'):
print(f"⏭️ {len(regressions)} regression(s) detected across unrelated benchmarks — "
"classified as likely environment noise, no regression issues will be opened.")
with open('/tmp/gh-aw/agent/benchmarks/regressions.json', 'w') as f:
json.dump([], f, indent=2)
return
Comment on lines +362 to +365
# Use the median of recent history (last 7 data points) as the baseline —
# the median is far less sensitive to one-off noisy runs than the mean
recent_history = historical_values[-7:] if len(historical_values) >= 7 else historical_values
avg_historical = sum(recent_history) / len(recent_history)
avg_historical = statistics.median(recent_history)
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.87.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[performance] Likely environment noise: 5 benchmarks show 33%-328% regressions with no code cause

3 participants