Skip to content

Conversation

@not-matthias
Copy link
Member

@not-matthias not-matthias commented Nov 11, 2025

Fixes #31

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 11, 2025

CodSpeed Performance Report

Merging #32 will not alter performance

Comparing cod-1666-codspeed-go-is-unable-to-run-benchmarks-on-go-modules-with (1679125) with main (5a7740c)

Summary

✅ 24 untouched
🆕 6 new

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 bench_collect_results[10000000] N/A 21.5 s N/A
🆕 bench_collect_results[1000000] N/A 1.8 s N/A
🆕 bench_collect_results[100000] N/A 182 ms N/A
🆕 bench_collect_results[5000000] N/A 10.9 s N/A
🆕 bench_collect_results[500000] N/A 916.5 ms N/A
🆕 bench_go_runner N/A 38.8 s N/A

@not-matthias not-matthias force-pushed the cod-1666-codspeed-go-is-unable-to-run-benchmarks-on-go-modules-with branch 6 times, most recently from 613804f to 3a8a45b Compare November 11, 2025 15:42
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 support for Go modules with replace directives (fixes #31) and adds a dry-run mode for benchmarking. The key changes involve copying the entire git repository instead of just the module directory to properly support local replace directives, handling symlinks, and adding build-only mode for performance testing.

  • Implements dry-run CLI flag that builds benchmarks without executing them
  • Changes build process to copy entire git repository instead of just module directory to support replace directives
  • Adds symlink handling in directory copying to follow directory symlinks
  • Adds performance benchmarking infrastructure using divan/codspeed

Reviewed Changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
go-runner/src/cli.rs Adds dry-run flag parsing and documentation
go-runner/src/lib.rs Implements dry-run mode to skip benchmark execution and result collection
go-runner/src/utils.rs Adds symlink handling and makes git repo path function public
go-runner/src/builder/templater.rs Changes to copy git root instead of module dir and calculates module paths relative to git root
go-runner/src/builder/patcher.rs Adds graceful error handling for unparseable Go files and optimization to skip parsing when unnecessary
go-runner/src/builder/discovery.rs Optimizes benchmark detection by checking for "func Benchmark" before parsing
go-runner/tests/pkg_arg.rs Updates tests to include dry_run field
go-runner/testdata/projects/example-with-replace/* Adds new test project demonstrating replace directive support
go-runner/benches/go_runner.rs Adds performance benchmark for the go-runner itself
go-runner/Cargo.toml Adds divan benchmarking dependency and configuration
.github/workflows/codspeed.yml Adds CI workflow for running benchmarks

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

@not-matthias not-matthias force-pushed the cod-1666-codspeed-go-is-unable-to-run-benchmarks-on-go-modules-with branch 3 times, most recently from 9ad0d41 to 1f04f81 Compare November 12, 2025 12:01
Copy link
Member

@adriencaccia adriencaccia left a comment

Choose a reason for hiding this comment

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

lgtm, waiting on @GuillaumeLagrange's review

@not-matthias not-matthias force-pushed the cod-1666-codspeed-go-is-unable-to-run-benchmarks-on-go-modules-with branch from 4342a96 to efd03cb Compare November 12, 2025 12:54
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.

olgtm, next review should be almost instant

@not-matthias not-matthias force-pushed the cod-1666-codspeed-go-is-unable-to-run-benchmarks-on-go-modules-with branch from 614fa45 to d785401 Compare November 12, 2025 14:52
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 force-pushed the cod-1666-codspeed-go-is-unable-to-run-benchmarks-on-go-modules-with branch from d785401 to 1679125 Compare November 12, 2025 15:14
@not-matthias not-matthias merged commit 1679125 into main Nov 12, 2025
16 checks passed
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.

codspeed-go is unable to run benchmarks on Go modules with local replaces

4 participants