Skip to content

Conversation

not-matthias
Copy link
Member

@not-matthias not-matthias commented Sep 15, 2025

Note: b.Loop() benchmarks previously reported an incorrect time because rounds was always set to 1. This is why we have a huge performance boost.

Copy link

codspeed-hq bot commented Sep 15, 2025

CodSpeed Performance Report

Merging #16 will improve performances by ×26

Comparing cod-1330-golang-dx-improvements (9d21400) with main (ce62136)

Summary

⚡ 7 improvements
✅ 15 untouched

Benchmarks breakdown

Benchmark BASE HEAD Change
BenchmarkQuicktest 178.1 µs 6.8 µs ×26
BenchmarkWithSlogAssert 203.8 µs 52.6 µs ×3.9
BenchmarkTestifyWithNew 76.5 µs 7.7 µs ×9.9
BenchmarkTestifyWithT 40.5 µs 3.7 µs ×11
BenchmarkFibonacci20_Loop 106.8 µs 68.6 µs +55.62%
BenchmarkSleep100ns_Loop 1,104 ns 240 ns ×4.6
BenchmarkSleep1us_Loop 1.7 µs 1.2 µs +51.04%

@not-matthias not-matthias force-pushed the cod-1330-golang-dx-improvements branch from 95d207c to 101aac0 Compare September 15, 2025 17:09
Copy link

@Copilot 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 introduces multiple improvements to the Go benchmarking system including better iteration tracking, improved output ordering, enhanced logging configuration, and adds support for helper functions in benchmarks.

Key changes:

  • Enhanced iteration counting logic for both b.N and b.Loop() patterns
  • Moved benchmark output formatting before CodSpeed processing for better UX
  • Improved import patching to cover all Go files instead of just benchmark files
  • Added support for benchmark helper functions with a new test project

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
testing/testing/benchmark.go Enhanced iteration tracking logic and reordered output formatting
go-runner/testdata/projects/example-with-helper/* New test project demonstrating benchmark helper function support
go-runner/src/results/raw_result.rs Removed default empty iters_per_round fallback logic
go-runner/src/main.rs Enhanced logging configuration with default info level
go-runner/src/integration_tests.rs Added test case for example-with-helper project
go-runner/src/builder/templater.rs Updated to patch all files instead of specific benchmark files
go-runner/src/builder/patcher.rs Expanded import patching to cover all Go files
Various snapshot files Updated test snapshots reflecting changes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@not-matthias not-matthias requested a review from art049 September 15, 2025 17:13
@not-matthias not-matthias force-pushed the cod-1330-golang-dx-improvements branch from 47a8cd0 to 9cfcfe1 Compare September 15, 2025 17:32
@not-matthias not-matthias force-pushed the cod-1330-golang-dx-improvements branch from 9cfcfe1 to 9d21400 Compare September 16, 2025 13:12
@not-matthias not-matthias force-pushed the cod-1330-golang-dx-improvements branch from 9d21400 to 81d403b Compare September 16, 2025 13:15
@not-matthias not-matthias merged commit 81d403b into main Sep 16, 2025
10 checks passed
@not-matthias not-matthias deleted the cod-1330-golang-dx-improvements branch September 16, 2025 13:33
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.

2 participants