Documentation ¶
Index ¶
- Constants
- Variables
- func CopyDiagnosticData(diagPath string, typ diagnostics.Type, pattern string) error
- func DiagnosticEnabled(typ diagnostics.Type) bool
- func PerfFlags() []string
- func ProcessPeakRSS(s *os.ProcessState) uint64
- func ReadPeakRSS(pid int) (uint64, error)
- func ReadPeakVM(pid int) (uint64, error)
- func ReadRSS(pid int) (uint64, error)
- func RunBenchmark(name string, f func(*B) error, opts ...RunOption) error
- func SetFlags(f *flag.FlagSet)
- func WritePprofProfile(prof *profile.Profile, typ diagnostics.Type, pattern string) error
- type B
- type RunOption
- func BenchmarkPID(pid int) RunOption
- func DoAvgRSS(f func() (uint64, error)) RunOption
- func DoCPUProfile(v bool) RunOption
- func DoCoreDump(v bool) RunOption
- func DoDefaultAvgRSS() RunOption
- func DoMemProfile(v bool) RunOption
- func DoPeakRSS(v bool) RunOption
- func DoPeakVM(v bool) RunOption
- func DoPerf(v bool) RunOption
- func DoTime(v bool) RunOption
- func DoTrace(v bool) RunOption
- func WithContext(ctx context.Context) RunOption
- func WithGOMAXPROCS(procs int) RunOption
- func WriteResultsTo(wr io.Writer) RunOption
Constants ¶
View Source
const ( StatPeakRSS = "peak-RSS-bytes" StatPeakVM = "peak-VM-bytes" StatAvgRSS = "average-RSS-bytes" StatTime = "ns/op" )
Variables ¶
View Source
var InProcessMeasurementOptions = []RunOption{ DoTime(true), DoPeakRSS(true), DoDefaultAvgRSS(), DoPeakVM(true), DoCoreDump(true), DoCPUProfile(true), DoMemProfile(true), DoPerf(true), DoTrace(true), }
Functions ¶
func CopyDiagnosticData ¶
func CopyDiagnosticData(diagPath string, typ diagnostics.Type, pattern string) error
func DiagnosticEnabled ¶
func DiagnosticEnabled(typ diagnostics.Type) bool
func ProcessPeakRSS ¶
func ProcessPeakRSS(s *os.ProcessState) uint64
func ReadPeakRSS ¶
func ReadPeakVM ¶
func WritePprofProfile ¶
Types ¶
type B ¶
type B struct {
// contains filtered or unexported fields
}
func (*B) ResetTimer ¶
func (b *B) ResetTimer()
func (*B) StartTimer ¶
func (b *B) StartTimer()
func (*B) TimerRunning ¶
type RunOption ¶
type RunOption func(*B)
func BenchmarkPID ¶
func DoCPUProfile ¶
func DoCoreDump ¶
func DoDefaultAvgRSS ¶
func DoDefaultAvgRSS() RunOption
func DoMemProfile ¶
func WithContext ¶
func WithGOMAXPROCS ¶
func WriteResultsTo ¶
Click to show internal directories.
Click to hide internal directories.