Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ScalerBlockProfile = MutexProfileScaler{}
View Source
var ScalerMutexProfile = MutexProfileScaler{}
Functions ¶
func Runtime_cyclesPerSecond ¶ added in v0.1.6
func Runtime_cyclesPerSecond() int64
func ScaleMutexProfile ¶ added in v0.1.6
func ScaleMutexProfile(_ MutexProfileScaler, cnt int64, ns float64) (int64, float64)
ScaleMutexProfile is a no-op for go1.20+. https://github.com/golang/go/commit/30b1af00ff142a3f1a5e2a0f32cf04a649bd5e65
Types ¶
type DeltaHeapProfiler ¶
type DeltaHeapProfiler struct { Options ProfileBuilderOptions // contains filtered or unexported fields }
func (*DeltaHeapProfiler) WriteHeapProto ¶
func (d *DeltaHeapProfiler) WriteHeapProto(w io.Writer, p []runtime.MemProfileRecord, rate int64, defaultSampleType string) error
WriteHeapProto writes the current heap profile in protobuf format to w.
type DeltaMutexProfiler ¶
type DeltaMutexProfiler struct { Options ProfileBuilderOptions // contains filtered or unexported fields }
func (*DeltaMutexProfiler) PrintCountCycleProfile ¶
func (d *DeltaMutexProfiler) PrintCountCycleProfile(w io.Writer, countName, cycleName string, scaler MutexProfileScaler, records []runtime.BlockProfileRecord) error
PrintCountCycleProfile outputs block profile records (for block or mutex profiles) as the pprof-proto format output. Translations from cycle count to time duration are done because The proto expects count and time (nanoseconds) instead of count and the number of cycles for block, contention profiles. Possible 'scaler' functions are scaleBlockProfile and scaleMutexProfile.
type MutexProfileScaler ¶ added in v0.1.4
type MutexProfileScaler struct { }
type ProfileBuilderOptions ¶ added in v0.1.6
type ProfileBuilderOptions struct { // for go1.21+ if true - use runtime_FrameSymbolName - produces frames with generic types, for example [go.shape.int] // for go1.21+ if false - use runtime.Frame->Function - produces frames with generic types ommited [...] // pre 1.21 - always use runtime.Frame->Function - produces frames with generic types ommited [...] GenericsFrames bool LazyMapping bool }
Click to show internal directories.
Click to hide internal directories.