Documentation
¶
Index ¶
- func CollapsedToProfile(b []byte, name string, maxNodes int) ([]*flamebearer.FlamebearerProfile, error)
- func Converter(p ProfileFile) (ConverterFn, ProfileFileType, error)
- func FlamebearerFromFile(f ProfileFile, maxNodes int) ([]*flamebearer.FlamebearerProfile, error)
- func JSONToProfile(b []byte, name string, maxNodes int) ([]*flamebearer.FlamebearerProfile, error)
- func PerfScriptToProfile(b []byte, name string, maxNodes int) ([]*flamebearer.FlamebearerProfile, error)
- func PprofToProfile(b []byte, name string, maxNodes int) ([]*flamebearer.FlamebearerProfile, error)
- type ConverterFn
- type ProfileFile
- type ProfileFileType
- type ProfileFileTypeData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollapsedToProfile ¶
func CollapsedToProfile(b []byte, name string, maxNodes int) ([]*flamebearer.FlamebearerProfile, error)
func Converter ¶
func Converter(p ProfileFile) (ConverterFn, ProfileFileType, error)
Converter returns a ConverterFn that converts to FlamebearerProfile and overrides any specified fields.
func FlamebearerFromFile ¶
func FlamebearerFromFile(f ProfileFile, maxNodes int) ([]*flamebearer.FlamebearerProfile, error)
func JSONToProfile ¶
func JSONToProfile(b []byte, name string, maxNodes int) ([]*flamebearer.FlamebearerProfile, error)
func PerfScriptToProfile ¶
func PerfScriptToProfile(b []byte, name string, maxNodes int) ([]*flamebearer.FlamebearerProfile, error)
func PprofToProfile ¶
func PprofToProfile(b []byte, name string, maxNodes int) ([]*flamebearer.FlamebearerProfile, error)
Types ¶
type ConverterFn ¶
type ConverterFn func(b []byte, name string, maxNodes int) ([]*flamebearer.FlamebearerProfile, error)
type ProfileFile ¶
type ProfileFile struct {
// Name of the file in which the profile was saved. Optional.
// example: pyroscope.server.cpu-2022-01-23T14:31:43Z.json
Name string
// Type of profile. Optional.
Type ProfileFileType
TypeData ProfileFileTypeData
// Raw profile bytes. Required, min length 2.
Data []byte
}
ProfileFile represents content to be converted to flamebearer.
type ProfileFileType ¶
type ProfileFileType string
const ( ProfileFileTypeJSON ProfileFileType = "json" ProfileFileTypePprof ProfileFileType = "pprof" ProfileFileTypeCollapsed ProfileFileType = "collapsed" ProfileFileTypePerfScript ProfileFileType = "perf_script" )
type ProfileFileTypeData ¶
Click to show internal directories.
Click to hide internal directories.