Skip to content

testing: test.memprofilerate documentation is not accurate #16404

Description

@bradfitz

The docs for the -test.memprofilerate flag say "if >= 0", but the code is simply greater, not greater than or equal:

~/go/src/testing$ git grep memProfileRate
testing.go:     memProfileRate   = flag.Int("test.memprofilerate", 0, "if >=0, sets runtime.MemProfileRate")
testing.go:     if *memProfileRate > 0 {
testing.go:             runtime.MemProfileRate = *memProfileRate

And the default is 512KB, not 0: https://golang.org/pkg/runtime/#pkg-variables

Activity

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

    DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions