Skip to content

Conversation

@not-matthias
Copy link
Member

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where the StopBenchmark command was not being emitted when benchmarks fail, which could result in excessive sampling of irrelevant performance data and incorrect marker pairs (having SampleStart without SampleStop).

Key changes:

  • Added ensureBenchmarkIsStopped() function to safely stop benchmarks on failure
  • Calls this function in two failure scenarios: in run1() when the initial benchmark run fails, and in processBench() when the main benchmark run fails
  • Updated the build process to apply the new patch

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
testing/testing/codspeed.go Adds ensureBenchmarkIsStopped() helper function to ensure StopBenchmark is called when benchmarks fail
testing/testing/benchmark.go Calls ensureBenchmarkIsStopped() in two failure paths: after run1() fails and after doBench() fails in processBench()
testing/patches/benchmark_stopbenchmark_fail.patch Patch file containing the changes to benchmark.go for the fork process
testing/fork.sh Applies the new patch during the build process to modify the forked Go testing package

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 18, 2025

CodSpeed Performance Report

Merging #40 will degrade performances by 17.34%

Comparing cod-1703-codspeed-go-run-fails-due-to-multiple-start-markers (ed16991) with main (140fee0)

Summary

❌ 1 regression
✅ 41 untouched

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
bench_collect_results[10000000, 25] 5 s 6 s -17.34%

Copy link

@GuillaumeLagrange GuillaumeLagrange left a comment

Choose a reason for hiding this comment

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

lgtm

@not-matthias not-matthias merged commit ed16991 into main Nov 18, 2025
21 of 22 checks passed
@not-matthias not-matthias deleted the cod-1703-codspeed-go-run-fails-due-to-multiple-start-markers branch November 18, 2025 12:56
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.

3 participants