Skip to content

testing: test.memprofilerate documentation is not accurate #16404

@bradfitz

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

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