Skip to content

Cod 1173 build golang tests with codspeed instrumentation in runner#4

Merged
not-matthias merged 11 commits intomainfrom
cod-1173-build-golang-tests-with-codspeed-instrumentation-in-runner
Aug 28, 2025
Merged

Cod 1173 build golang tests with codspeed instrumentation in runner#4
not-matthias merged 11 commits intomainfrom
cod-1173-build-golang-tests-with-codspeed-instrumentation-in-runner

Conversation

@not-matthias
Copy link
Copy Markdown
Member

Continuation from #3 : Accidentally pushed target during a rebase and let Claude fix it, which closed the PR(?)

The process is split into multiple parts:

  • Discovery: Finds all the test packages for a project, filters out packages without benchmarks.
    • Verifier: Walks the AST of a source file to ensure the t *testing.B parameter isn't passed to a function.
  • Templater: Copies the project to a tmp folder, creates a new cli/runner.go main file with the benchmarks.
    • Patcher: Patches the imports from testing to our codspeed compat package
  • Runner: Builds the cli/runner.go and outputs the binary.

@not-matthias not-matthias force-pushed the cod-1172-create-codspeed-go-repository-with-the-compat-layer branch from f8a0011 to a412fea Compare August 25, 2025 14:10
@not-matthias not-matthias force-pushed the cod-1173-build-golang-tests-with-codspeed-instrumentation-in-runner branch from 02935b0 to 72c9f67 Compare August 25, 2025 14:12
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Aug 25, 2025

CodSpeed Performance Report

Congrats! CodSpeed is installed 🎉

🆕 10 new benchmarks were detected.

You will start to see performance impacts in the reports once the benchmarks are run from your default branch.

Detected benchmarks

  • BenchmarkFibonacci20_Loop (71.1 µs)
  • BenchmarkFibonacci20_bN (68.7 µs)
  • BenchmarkSleep100ns (206 ns)
  • BenchmarkSleep100us (100.1 µs)
  • BenchmarkSleep10ms (10 ms)
  • BenchmarkSleep10us (10.1 µs)
  • BenchmarkSleep1ms (1 ms)
  • BenchmarkSleep1us (1.1 µs)
  • BenchmarkSleep50ms (50 ms)
  • fibonacci(10) (549 ns)

@not-matthias not-matthias force-pushed the cod-1172-create-codspeed-go-repository-with-the-compat-layer branch from a412fea to 0ba720d Compare August 25, 2025 14:24
@not-matthias not-matthias force-pushed the cod-1173-build-golang-tests-with-codspeed-instrumentation-in-runner branch from 72c9f67 to 62cce6d Compare August 25, 2025 14:30
@not-matthias not-matthias force-pushed the cod-1172-create-codspeed-go-repository-with-the-compat-layer branch from 507a96a to 7859c4c Compare August 25, 2025 14:41
@not-matthias not-matthias force-pushed the cod-1173-build-golang-tests-with-codspeed-instrumentation-in-runner branch from 62cce6d to 58ad476 Compare August 25, 2025 14:44
@not-matthias not-matthias requested a review from art049 August 25, 2025 15:18
@not-matthias not-matthias force-pushed the cod-1173-build-golang-tests-with-codspeed-instrumentation-in-runner branch 4 times, most recently from f26e3f3 to b2d863e Compare August 26, 2025 08:48
@not-matthias not-matthias changed the base branch from cod-1172-create-codspeed-go-repository-with-the-compat-layer to main August 26, 2025 09:14
Copy link
Copy Markdown
Contributor

@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,
watch out some commits are unverified tho

Comment thread go-runner/src/builder/discovery.rs Outdated
Comment thread go-runner/src/builder/discovery.rs
Comment thread go-runner/src/builder/discovery.rs Outdated
Comment thread go-runner/src/builder/discovery.rs Outdated
Comment thread go-runner/src/builder/discovery.rs
Comment thread go-runner/src/builder/patcher.rs Outdated
Comment thread go-runner/src/builder/patcher.rs Outdated
Comment thread go-runner/src/utils.rs Outdated
Comment thread .gitattributes Outdated
Comment thread go-runner/src/cli.rs
Comment thread go-runner/src/builder/runner.rs
Copy link
Copy Markdown
Member

@art049 art049 left a comment

Choose a reason for hiding this comment

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

Looks really cool! Excited to see it working

Comment thread go-runner/src/builder/verifier.rs Outdated
Comment thread go-runner/testdata/raw_results/0e63aecf81ebd4160bcb4533a480bc22.json Outdated
Comment thread go-runner/testdata/results/2595579.json Outdated
@not-matthias not-matthias force-pushed the cod-1173-build-golang-tests-with-codspeed-instrumentation-in-runner branch 7 times, most recently from 877a3c6 to 6aac26f Compare August 26, 2025 16:14
@not-matthias not-matthias force-pushed the cod-1173-build-golang-tests-with-codspeed-instrumentation-in-runner branch from 6aac26f to 563e79d Compare August 26, 2025 16:23
@not-matthias not-matthias force-pushed the cod-1173-build-golang-tests-with-codspeed-instrumentation-in-runner branch from a03f4dd to 55cf82d Compare August 26, 2025 17:17
@not-matthias not-matthias requested a review from art049 August 27, 2025 07:51
@not-matthias not-matthias force-pushed the cod-1173-build-golang-tests-with-codspeed-instrumentation-in-runner branch from 55cf82d to e6c78e5 Compare August 27, 2025 13:07
@not-matthias not-matthias merged commit e6c78e5 into main Aug 28, 2025
5 checks passed
@not-matthias not-matthias deleted the cod-1173-build-golang-tests-with-codspeed-instrumentation-in-runner branch August 28, 2025 08:17
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