Skip to content

Commit 93eb80f

Browse files
committed
feat: support go 1.26 and 1.27
Add a version-matched benchmark.go overlay for Go 1.26 (identical upstream file in 1.27) and extend the CI test matrix to 1.26.x and 1.27.x.
1 parent e9f4807 commit 93eb80f

7 files changed

Lines changed: 1348 additions & 7 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
go-version: ["1.24.x", "1.25.x"]
25+
go-version: ["1.24.x", "1.25.x", "1.26.x", "1.27.x"]
2626
env:
2727
# Needed for the quic-go test
2828
GOEXPERIMENT: ${{ matrix.go-version == '1.24.x' && 'synctest' || '' }}

‎AGENTS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cargo test test_name_here
2222

2323
Pre-commit hooks enforce: `go-mod-tidy`, `go-fmt`, `cargo fmt`, `cargo check --all-targets`, `clippy -D warnings`.
2424

25-
CI tests against Go 1.24.x and 1.25.x. Go 1.24 tests require `GOEXPERIMENT=synctest`.
25+
CI tests against Go 1.24.x, 1.25.x, 1.26.x and 1.27.x. Go 1.24 tests require `GOEXPERIMENT=synctest`.
2626

2727
## Architecture
2828

@@ -31,7 +31,7 @@ Rust workspace with a single crate: `go-runner/` (`codspeed-go-runner`), edition
3131
**Flow:** `main.rs` parses CLI args → `runner::run()` generates overlay + runs `go test` → Go benchmarks write raw JSON results to `$CODSPEED_PROFILE_FOLDER/raw_results/` → `collect_walltime_results()` aggregates into `results/{pid}.json`.
3232

3333
**Overlay mechanism:** Three files are overlaid into `$GOROOT/src/testing/`:
34-
- `benchmark.go` — replaces the standard `testing.B` implementation (version-specific: 1.24 or 1.25+)
34+
- `benchmark.go` — replaces the standard `testing.B` implementation (version-specific: 1.24, 1.25 or 1.26+)
3535
- `codspeed.go` — CodSpeed measurement logic, result saving, `codspeed` struct with per-round measurements
3636
- `instrument-hooks.go` — cgo FFI bindings to the C instrument-hooks library (downloaded at runtime)
3737

‎go-runner/overlay/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ This directory contains CodSpeed instrumentation overlays for Go's standard `tes
44

55
## Files
66

7-
- `benchmark1.24.0.go`, `benchmark1.25.0.go` - Modified versions of Go's `testing/benchmark.go` with CodSpeed instrumentation
8-
- `benchmark1.24.0.patch`, `benchmark1.25.0.patch` - Patch files showing differences from upstream
7+
- `benchmark1.24.0.go`, `benchmark1.25.0.go`, `benchmark1.26.0.go` - Modified versions of Go's `testing/benchmark.go` with CodSpeed instrumentation
8+
- `benchmark1.24.0.patch`, `benchmark1.25.0.patch`, `benchmark1.26.0.patch` - Patch files showing differences from upstream
99
- `codspeed.go` - CodSpeed-specific benchmark extensions
1010
- `instrument-hooks.go` - Bindings to the instrument-hooks library
1111

0 commit comments

Comments
 (0)