The docstring for SetCPUProfileRate states,
Most clients should use the runtime/pprof package or the testing package's -test.cpuprofile flag instead of calling SetCPUProfileRate directly.
However, the -test.cpuprofile flag does not allow you to set the CPU profile rate, only the name of the file to which the profile should be written out to. The sentence quoted above should probably be removed.