Documentation ¶
Index ¶
- func ParseProfileFrom(r io.Reader) (*pprofProfile.Profile, error)
- func ProfilesEqual(pp1, pp2 *pprofProfile.Profile) bool
- func SampleAddLabel(s *pprofProfile.Sample, key, valueStr string, valueNum int64)
- type ProfileBuilder
- func (pb *ProfileBuilder) AddFunction(fn *pprofProfile.Function)
- func (pb *ProfileBuilder) AddLocation(loc *pprofProfile.Location)
- func (pb *ProfileBuilder) AddMapping(m *pprofProfile.Mapping)
- func (pb *ProfileBuilder) AddSample(s *pprofProfile.Sample)
- func (pb *ProfileBuilder) Build() (*pprofProfile.Profile, error)
- func (pb *ProfileBuilder) IsEmpty() bool
- type ProfileParser
- type ProfileParserError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseProfileFrom ¶
func ParseProfileFrom(r io.Reader) (*pprofProfile.Profile, error)
func ProfilesEqual ¶
func ProfilesEqual(pp1, pp2 *pprofProfile.Profile) bool
ProfilesEqual is a test helper that checks whether two profiles equal.
func SampleAddLabel ¶
func SampleAddLabel(s *pprofProfile.Sample, key, valueStr string, valueNum int64)
SampleAddLabel adds a key-value pair to the sample. Note that, non-empty valueStr take precedence over valueNum.
Types ¶
type ProfileBuilder ¶
type ProfileBuilder struct {
// contains filtered or unexported fields
}
func NewProfileBuilder ¶
func NewProfileBuilder(ptyp profile.ProfileType) *ProfileBuilder
func (*ProfileBuilder) AddFunction ¶
func (pb *ProfileBuilder) AddFunction(fn *pprofProfile.Function)
func (*ProfileBuilder) AddLocation ¶
func (pb *ProfileBuilder) AddLocation(loc *pprofProfile.Location)
func (*ProfileBuilder) AddMapping ¶
func (pb *ProfileBuilder) AddMapping(m *pprofProfile.Mapping)
func (*ProfileBuilder) AddSample ¶
func (pb *ProfileBuilder) AddSample(s *pprofProfile.Sample)
func (*ProfileBuilder) Build ¶
func (pb *ProfileBuilder) Build() (*pprofProfile.Profile, error)
func (*ProfileBuilder) IsEmpty ¶
func (pb *ProfileBuilder) IsEmpty() bool
type ProfileParser ¶
type ProfileParser struct {
// contains filtered or unexported fields
}
func NewProfileParser ¶
func NewProfileParser(data []byte) *ProfileParser
func (*ProfileParser) ParseProfile ¶
func (pr *ProfileParser) ParseProfile() (prof *pprofProfile.Profile, err error)
type ProfileParserError ¶
type ProfileParserError struct {
// contains filtered or unexported fields
}
func (*ProfileParserError) Error ¶
func (e *ProfileParserError) Error() string
func (*ProfileParserError) Unwrap ¶
func (e *ProfileParserError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.