Documentation
¶
Index ¶
- func Decode(r io.Reader, p *tree.Profile) error
- func DecodePool(r io.Reader, fn func(*tree.Profile) error) error
- type Parser
- type ParserConfig
- type ParserInterface
- type RawProfile
- func (p *RawProfile) Bytes() ([]byte, error)
- func (p *RawProfile) ContentType() string
- func (p *RawProfile) Parse(ctx context.Context, putter storage.Putter, _ storage.MetricsExporter, ...) error
- func (p *RawProfile) ParseWithWriteBatch(c context.Context, wb stackbuilder.WriteBatchFactory, md ingestion.Metadata) error
- func (p *RawProfile) Push(profile []byte, cumulative bool) *RawProfile
- type RbspyFormatter
- type StackFrameFormatter
- type UnsafeFunctionNameFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Parser ¶ added in v0.19.0
type Parser struct {
// contains filtered or unexported fields
}
func NewParser ¶ added in v0.19.0
func NewParser(config ParserConfig) *Parser
func (*Parser) ParsePprof ¶ added in v0.19.0
type ParserConfig ¶ added in v0.19.0
type ParserConfig struct {
Putter storage.Putter
SpyName string
Labels map[string]string
SkipExemplars bool
SampleTypes map[string]*tree.SampleTypeConfig
StackFrameFormatter StackFrameFormatter
}
type ParserInterface ¶ added in v0.37.0
type RawProfile ¶ added in v0.19.0
type RawProfile struct {
// Initializes lazily on Bytes, if not present.
RawData []byte // Represents raw request body as per ingestion API.
FormDataContentType string // Set optionally, if RawData is multipart form.
// Initializes lazily on Parse, if not present.
Profile []byte // Represents raw pprof data.
PreviousProfile []byte // Used for cumulative type only.
SkipExemplars bool
StreamingParser bool
PoolStreamingParser bool
ArenasEnabled bool
SampleTypeConfig map[string]*tree.SampleTypeConfig
// contains filtered or unexported fields
}
func (*RawProfile) Bytes ¶ added in v0.19.0
func (p *RawProfile) Bytes() ([]byte, error)
func (*RawProfile) ContentType ¶ added in v0.19.0
func (p *RawProfile) ContentType() string
func (*RawProfile) Parse ¶ added in v0.19.0
func (p *RawProfile) Parse(ctx context.Context, putter storage.Putter, _ storage.MetricsExporter, md ingestion.Metadata) error
func (*RawProfile) ParseWithWriteBatch ¶ added in v0.37.1
func (p *RawProfile) ParseWithWriteBatch(c context.Context, wb stackbuilder.WriteBatchFactory, md ingestion.Metadata) error
func (*RawProfile) Push ¶ added in v0.19.0
func (p *RawProfile) Push(profile []byte, cumulative bool) *RawProfile
Push loads data from profile to RawProfile making it eligible for Bytes and Parse calls.
Returned RawProfile should be used at the next Push: the method established relationship between these two RawProfiles in order to propagate internal pprof parser state lazily on a successful Parse call. This is necessary for cumulative profiles that require two consecutive samples to calculate the diff. If parser is not present due to a failure, or sequence violation, the profiles will be re-parsed.
type RbspyFormatter ¶ added in v0.28.0
type RbspyFormatter struct {
}
type StackFrameFormatter ¶ added in v0.28.0
type StackFrameFormatter interface {
// contains filtered or unexported methods
}
func StackFrameFormatterForSpyName ¶ added in v0.28.0
func StackFrameFormatterForSpyName(spyName string) StackFrameFormatter
type UnsafeFunctionNameFormatter ¶ added in v0.28.0
type UnsafeFunctionNameFormatter struct {
}
Click to show internal directories.
Click to hide internal directories.