Skip to content

testing: b.Loop gives bogus results in some situations [1.24 backport] #72974

Closed

Description

@gopherbot

@aclements requested issue #72971 to be considered for backport to the next 1.24 minor release.

@gopherbot, please open a backport to Go 1.24.

I'm on the fence about whether this should be backported. It makes b.Loop, which is new in Go 1.24, more robust to user mistakes, but those same mistakes could have been made with the old b.N style benchmarks, we just couldn't catch them. In support of backporting, it is a brand new feature and we're going to post a blog post about it soon so it'll probably get a spike in usage.

Activity

  1. added this to the Go1.24.2 milestone on Mar 20, 2025
  2. aclements commented on Mar 20, 2025

    @aclements
    Member

    If we do want to backport this, we need to land backport #72934 first.

  3. gopherbot commented on Mar 25, 2025

    @gopherbot
    ContributorAuthor

    Change https://go.dev/cl/660556 mentions this issue: [release-branch.go1.24] testing: separate b.Loop counter from b.N

  4. gopherbot commented on Mar 25, 2025

    @gopherbot
    ContributorAuthor

    Change https://go.dev/cl/660557 mentions this issue: [release-branch.go1.24] testing: detect early return from B.Loop

  5. gopherbot commented on Mar 25, 2025

    @gopherbot
    ContributorAuthor

    Change https://go.dev/cl/660558 mentions this issue: [release-branch.go1.24] testing: detect a stopped timer in B.Loop

  6. added
    CherryPickApprovedUsed during the release process for point releases
    and removed
    CherryPickCandidateUsed during the release process for point releases
    on Mar 26, 2025
  7. gopherbot commented on Mar 26, 2025

    @gopherbot
    ContributorAuthor

    Closed by merging CL 660556 (commit 9204aca) to release-branch.go1.24.

  8. added a commit that references this issue on Mar 26, 2025
    f3a3023
  9. locked and limited conversation to collaborators on Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions