Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpProfiles ¶
DumpProfiles dumps the raw golang pprof files to the specified directory. It uses the naming scheme exename-type-index.pprof, starting at the next index after the last one found in the specified directory.
Types ¶
type Function ¶
type Function struct { Name string // Memory usage is aggregated into one overall cost per function (stored as // MemoryCost here), so we must keep track of the number of times a function // is referenced in a profile, and then "distribute" the cost based on the // number of times it is referenced across the sample call stacks of a // profile. This value is calculated and cached in DistributedMemoryCost MemoryCost uint64 DistributedMemoryCost uint64 ReferenceCount int }
func (*Function) AddReferences ¶
type Profile ¶
type Profile struct { CpuSampleRateHz int USecPerSample uint64 Samples []*Sample // Note: Matching by ID didn't work since there seems to be some duplication // in the pprof data. We match by name instead since it's guaranteed unique. Functions map[string]*Function }
Profle contains a set of entry points, which collectively contain all sampled data
func NewProfile ¶
func NewProfile() *Profile
func ReadFromPProf ¶
Read a pprof format profile and convert to our internal format.
func (*Profile) CloneWithSamples ¶
Click to show internal directories.
Click to hide internal directories.