pprofile

package module
v0.111.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttributeUnit

type AttributeUnit struct {
	// contains filtered or unexported fields
}

AttributeUnit Represents a mapping between Attribute Keys and Units.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewAttributeUnit function to create new instances. Important: zero-initialized instance is not valid for use.

func NewAttributeUnit

func NewAttributeUnit() AttributeUnit

NewAttributeUnit creates a new empty AttributeUnit.

This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.

func (AttributeUnit) AttributeKey

func (ms AttributeUnit) AttributeKey() int64

AttributeKey returns the attributekey associated with this AttributeUnit.

func (AttributeUnit) CopyTo

func (ms AttributeUnit) CopyTo(dest AttributeUnit)

CopyTo copies all properties from the current struct overriding the destination.

func (AttributeUnit) MoveTo

func (ms AttributeUnit) MoveTo(dest AttributeUnit)

MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value

func (AttributeUnit) SetAttributeKey

func (ms AttributeUnit) SetAttributeKey(v int64)

SetAttributeKey replaces the attributekey associated with this AttributeUnit.

func (AttributeUnit) SetUnit

func (ms AttributeUnit) SetUnit(v int64)

SetUnit replaces the unit associated with this AttributeUnit.

func (AttributeUnit) Unit

func (ms AttributeUnit) Unit() int64

Unit returns the unit associated with this AttributeUnit.

type AttributeUnitSlice

type AttributeUnitSlice struct {
	// contains filtered or unexported fields
}

AttributeUnitSlice logically represents a slice of AttributeUnit.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewAttributeUnitSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewAttributeUnitSlice

func NewAttributeUnitSlice() AttributeUnitSlice

NewAttributeUnitSlice creates a AttributeUnitSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

func (AttributeUnitSlice) AppendEmpty

func (es AttributeUnitSlice) AppendEmpty() AttributeUnit

AppendEmpty will append to the end of the slice an empty AttributeUnit. It returns the newly added AttributeUnit.

func (AttributeUnitSlice) At

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice:

for i := 0; i < es.Len(); i++ {
    e := es.At(i)
    ... // Do something with the element
}

func (AttributeUnitSlice) CopyTo

func (es AttributeUnitSlice) CopyTo(dest AttributeUnitSlice)

CopyTo copies all elements from the current slice overriding the destination.

func (AttributeUnitSlice) EnsureCapacity

func (es AttributeUnitSlice) EnsureCapacity(newCap int)

EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.

Here is how a new AttributeUnitSlice can be initialized:

es := NewAttributeUnitSlice()
es.EnsureCapacity(4)
for i := 0; i < 4; i++ {
    e := es.AppendEmpty()
    // Here should set all the values for e.
}

func (AttributeUnitSlice) Len

func (es AttributeUnitSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewAttributeUnitSlice()".

func (AttributeUnitSlice) MoveAndAppendTo

func (es AttributeUnitSlice) MoveAndAppendTo(dest AttributeUnitSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (AttributeUnitSlice) RemoveIf

func (es AttributeUnitSlice) RemoveIf(f func(AttributeUnit) bool)

RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.

func (AttributeUnitSlice) Sort added in v0.111.0

func (es AttributeUnitSlice) Sort(less func(a, b AttributeUnit) bool)

Sort sorts the AttributeUnit elements within AttributeUnitSlice given the provided less function so that two instances of AttributeUnitSlice can be compared.

type Function

type Function struct {
	// contains filtered or unexported fields
}

Function describes a function, including its human-readable name, system name, source file, and starting line number in the source.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewFunction function to create new instances. Important: zero-initialized instance is not valid for use.

func NewFunction

func NewFunction() Function

NewFunction creates a new empty Function.

This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.

func (Function) CopyTo

func (ms Function) CopyTo(dest Function)

CopyTo copies all properties from the current struct overriding the destination.

func (Function) Filename

func (ms Function) Filename() int64

Filename returns the filename associated with this Function.

func (Function) ID

func (ms Function) ID() uint64

ID returns the id associated with this Function.

func (Function) MoveTo

func (ms Function) MoveTo(dest Function)

MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value

func (Function) Name

func (ms Function) Name() int64

Name returns the name associated with this Function.

func (Function) SetFilename

func (ms Function) SetFilename(v int64)

SetFilename replaces the filename associated with this Function.

func (Function) SetID

func (ms Function) SetID(v uint64)

SetID replaces the id associated with this Function.

func (Function) SetName

func (ms Function) SetName(v int64)

SetName replaces the name associated with this Function.

func (Function) SetStartLine

func (ms Function) SetStartLine(v int64)

SetStartLine replaces the startline associated with this Function.

func (Function) SetSystemName

func (ms Function) SetSystemName(v int64)

SetSystemName replaces the systemname associated with this Function.

func (Function) StartLine

func (ms Function) StartLine() int64

StartLine returns the startline associated with this Function.

func (Function) SystemName

func (ms Function) SystemName() int64

SystemName returns the systemname associated with this Function.

type FunctionSlice

type FunctionSlice struct {
	// contains filtered or unexported fields
}

FunctionSlice logically represents a slice of Function.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewFunctionSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewFunctionSlice

func NewFunctionSlice() FunctionSlice

NewFunctionSlice creates a FunctionSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

func (FunctionSlice) AppendEmpty

func (es FunctionSlice) AppendEmpty() Function

AppendEmpty will append to the end of the slice an empty Function. It returns the newly added Function.

func (FunctionSlice) At

func (es FunctionSlice) At(i int) Function

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice:

for i := 0; i < es.Len(); i++ {
    e := es.At(i)
    ... // Do something with the element
}

func (FunctionSlice) CopyTo

func (es FunctionSlice) CopyTo(dest FunctionSlice)

CopyTo copies all elements from the current slice overriding the destination.

func (FunctionSlice) EnsureCapacity

func (es FunctionSlice) EnsureCapacity(newCap int)

EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.

Here is how a new FunctionSlice can be initialized:

es := NewFunctionSlice()
es.EnsureCapacity(4)
for i := 0; i < 4; i++ {
    e := es.AppendEmpty()
    // Here should set all the values for e.
}

func (FunctionSlice) Len

func (es FunctionSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewFunctionSlice()".

func (FunctionSlice) MoveAndAppendTo

func (es FunctionSlice) MoveAndAppendTo(dest FunctionSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (FunctionSlice) RemoveIf

func (es FunctionSlice) RemoveIf(f func(Function) bool)

RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.

func (FunctionSlice) Sort added in v0.111.0

func (es FunctionSlice) Sort(less func(a, b Function) bool)

Sort sorts the Function elements within FunctionSlice given the provided less function so that two instances of FunctionSlice can be compared.

type JSONMarshaler added in v0.109.0

type JSONMarshaler struct{}

JSONMarshaler marshals pprofile.Profiles to JSON bytes using the OTLP/JSON format.

func (*JSONMarshaler) MarshalProfiles added in v0.109.0

func (*JSONMarshaler) MarshalProfiles(td Profiles) ([]byte, error)

MarshalProfiles to the OTLP/JSON format.

type JSONUnmarshaler added in v0.109.0

type JSONUnmarshaler struct{}

JSONUnmarshaler unmarshals OTLP/JSON formatted-bytes to pprofile.Profiles.

func (*JSONUnmarshaler) UnmarshalProfiles added in v0.109.0

func (*JSONUnmarshaler) UnmarshalProfiles(buf []byte) (Profiles, error)

UnmarshalProfiles from OTLP/JSON format into pprofile.Profiles.

type Label

type Label struct {
	// contains filtered or unexported fields
}

Label provided additional context for a sample

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewLabel function to create new instances. Important: zero-initialized instance is not valid for use.

func NewLabel

func NewLabel() Label

NewLabel creates a new empty Label.

This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.

func (Label) CopyTo

func (ms Label) CopyTo(dest Label)

CopyTo copies all properties from the current struct overriding the destination.

func (Label) Key

func (ms Label) Key() int64

Key returns the key associated with this Label.

func (Label) MoveTo

func (ms Label) MoveTo(dest Label)

MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value

func (Label) Num

func (ms Label) Num() int64

Num returns the num associated with this Label.

func (Label) NumUnit

func (ms Label) NumUnit() int64

NumUnit returns the numunit associated with this Label.

func (Label) SetKey

func (ms Label) SetKey(v int64)

SetKey replaces the key associated with this Label.

func (Label) SetNum

func (ms Label) SetNum(v int64)

SetNum replaces the num associated with this Label.

func (Label) SetNumUnit

func (ms Label) SetNumUnit(v int64)

SetNumUnit replaces the numunit associated with this Label.

func (Label) SetStr

func (ms Label) SetStr(v int64)

SetStr replaces the str associated with this Label.

func (Label) Str

func (ms Label) Str() int64

Str returns the str associated with this Label.

type LabelSlice

type LabelSlice struct {
	// contains filtered or unexported fields
}

LabelSlice logically represents a slice of Label.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewLabelSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewLabelSlice

func NewLabelSlice() LabelSlice

NewLabelSlice creates a LabelSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

func (LabelSlice) AppendEmpty

func (es LabelSlice) AppendEmpty() Label

AppendEmpty will append to the end of the slice an empty Label. It returns the newly added Label.

func (LabelSlice) At

func (es LabelSlice) At(i int) Label

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice:

for i := 0; i < es.Len(); i++ {
    e := es.At(i)
    ... // Do something with the element
}

func (LabelSlice) CopyTo

func (es LabelSlice) CopyTo(dest LabelSlice)

CopyTo copies all elements from the current slice overriding the destination.

func (LabelSlice) EnsureCapacity

func (es LabelSlice) EnsureCapacity(newCap int)

EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.

Here is how a new LabelSlice can be initialized:

es := NewLabelSlice()
es.EnsureCapacity(4)
for i := 0; i < 4; i++ {
    e := es.AppendEmpty()
    // Here should set all the values for e.
}

func (LabelSlice) Len

func (es LabelSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewLabelSlice()".

func (LabelSlice) MoveAndAppendTo

func (es LabelSlice) MoveAndAppendTo(dest LabelSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (LabelSlice) RemoveIf

func (es LabelSlice) RemoveIf(f func(Label) bool)

RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.

func (LabelSlice) Sort added in v0.111.0

func (es LabelSlice) Sort(less func(a, b Label) bool)

Sort sorts the Label elements within LabelSlice given the provided less function so that two instances of LabelSlice can be compared.

type Line

type Line struct {
	// contains filtered or unexported fields
}

Line details a specific line in a source code, linked to a function.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewLine function to create new instances. Important: zero-initialized instance is not valid for use.

func NewLine

func NewLine() Line

NewLine creates a new empty Line.

This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.

func (Line) Column

func (ms Line) Column() int64

Column returns the column associated with this Line.

func (Line) CopyTo

func (ms Line) CopyTo(dest Line)

CopyTo copies all properties from the current struct overriding the destination.

func (Line) FunctionIndex

func (ms Line) FunctionIndex() uint64

FunctionIndex returns the functionindex associated with this Line.

func (Line) Line

func (ms Line) Line() int64

Line returns the line associated with this Line.

func (Line) MoveTo

func (ms Line) MoveTo(dest Line)

MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value

func (Line) SetColumn

func (ms Line) SetColumn(v int64)

SetColumn replaces the column associated with this Line.

func (Line) SetFunctionIndex

func (ms Line) SetFunctionIndex(v uint64)

SetFunctionIndex replaces the functionindex associated with this Line.

func (Line) SetLine

func (ms Line) SetLine(v int64)

SetLine replaces the line associated with this Line.

type LineSlice

type LineSlice struct {
	// contains filtered or unexported fields
}

LineSlice logically represents a slice of Line.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewLineSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewLineSlice

func NewLineSlice() LineSlice

NewLineSlice creates a LineSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

func (LineSlice) AppendEmpty

func (es LineSlice) AppendEmpty() Line

AppendEmpty will append to the end of the slice an empty Line. It returns the newly added Line.

func (LineSlice) At

func (es LineSlice) At(i int) Line

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice:

for i := 0; i < es.Len(); i++ {
    e := es.At(i)
    ... // Do something with the element
}

func (LineSlice) CopyTo

func (es LineSlice) CopyTo(dest LineSlice)

CopyTo copies all elements from the current slice overriding the destination.

func (LineSlice) EnsureCapacity

func (es LineSlice) EnsureCapacity(newCap int)

EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.

Here is how a new LineSlice can be initialized:

es := NewLineSlice()
es.EnsureCapacity(4)
for i := 0; i < 4; i++ {
    e := es.AppendEmpty()
    // Here should set all the values for e.
}

func (LineSlice) Len

func (es LineSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewLineSlice()".

func (LineSlice) MoveAndAppendTo

func (es LineSlice) MoveAndAppendTo(dest LineSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (LineSlice) RemoveIf

func (es LineSlice) RemoveIf(f func(Line) bool)

RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.

func (LineSlice) Sort added in v0.111.0

func (es LineSlice) Sort(less func(a, b Line) bool)

Sort sorts the Line elements within LineSlice given the provided less function so that two instances of LineSlice can be compared.

type Link struct {
	// contains filtered or unexported fields
}

Link represents a pointer from a profile Sample to a trace Span.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewLink function to create new instances. Important: zero-initialized instance is not valid for use.

func NewLink() Link

NewLink creates a new empty Link.

This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.

func (Link) CopyTo

func (ms Link) CopyTo(dest Link)

CopyTo copies all properties from the current struct overriding the destination.

func (Link) MoveTo

func (ms Link) MoveTo(dest Link)

MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value

func (Link) SetSpanID

func (ms Link) SetSpanID(v pcommon.SpanID)

SetSpanID replaces the spanid associated with this Link.

func (Link) SetTraceID

func (ms Link) SetTraceID(v pcommon.TraceID)

SetTraceID replaces the traceid associated with this Link.

func (Link) SpanID

func (ms Link) SpanID() pcommon.SpanID

SpanID returns the spanid associated with this Link.

func (Link) TraceID

func (ms Link) TraceID() pcommon.TraceID

TraceID returns the traceid associated with this Link.

type LinkSlice

type LinkSlice struct {
	// contains filtered or unexported fields
}

LinkSlice logically represents a slice of Link.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewLinkSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewLinkSlice

func NewLinkSlice() LinkSlice

NewLinkSlice creates a LinkSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

func (LinkSlice) AppendEmpty

func (es LinkSlice) AppendEmpty() Link

AppendEmpty will append to the end of the slice an empty Link. It returns the newly added Link.

func (LinkSlice) At

func (es LinkSlice) At(i int) Link

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice:

for i := 0; i < es.Len(); i++ {
    e := es.At(i)
    ... // Do something with the element
}

func (LinkSlice) CopyTo

func (es LinkSlice) CopyTo(dest LinkSlice)

CopyTo copies all elements from the current slice overriding the destination.

func (LinkSlice) EnsureCapacity

func (es LinkSlice) EnsureCapacity(newCap int)

EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.

Here is how a new LinkSlice can be initialized:

es := NewLinkSlice()
es.EnsureCapacity(4)
for i := 0; i < 4; i++ {
    e := es.AppendEmpty()
    // Here should set all the values for e.
}

func (LinkSlice) Len

func (es LinkSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewLinkSlice()".

func (LinkSlice) MoveAndAppendTo

func (es LinkSlice) MoveAndAppendTo(dest LinkSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (LinkSlice) RemoveIf

func (es LinkSlice) RemoveIf(f func(Link) bool)

RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.

func (LinkSlice) Sort added in v0.111.0

func (es LinkSlice) Sort(less func(a, b Link) bool)

Sort sorts the Link elements within LinkSlice given the provided less function so that two instances of LinkSlice can be compared.

type Location

type Location struct {
	// contains filtered or unexported fields
}

Location describes function and line table debug information.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewLocation function to create new instances. Important: zero-initialized instance is not valid for use.

func NewLocation

func NewLocation() Location

NewLocation creates a new empty Location.

This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.

func (Location) Address

func (ms Location) Address() uint64

Address returns the address associated with this Location.

func (Location) Attributes

func (ms Location) Attributes() pcommon.UInt64Slice

Attributes returns the Attributes associated with this Location.

func (Location) CopyTo

func (ms Location) CopyTo(dest Location)

CopyTo copies all properties from the current struct overriding the destination.

func (Location) ID

func (ms Location) ID() uint64

ID returns the id associated with this Location.

func (Location) IsFolded

func (ms Location) IsFolded() bool

IsFolded returns the isfolded associated with this Location.

func (Location) Line

func (ms Location) Line() LineSlice

Line returns the Line associated with this Location.

func (Location) MappingIndex

func (ms Location) MappingIndex() uint64

MappingIndex returns the mappingindex associated with this Location.

func (Location) MoveTo

func (ms Location) MoveTo(dest Location)

MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value

func (Location) SetAddress

func (ms Location) SetAddress(v uint64)

SetAddress replaces the address associated with this Location.

func (Location) SetID

func (ms Location) SetID(v uint64)

SetID replaces the id associated with this Location.

func (Location) SetIsFolded

func (ms Location) SetIsFolded(v bool)

SetIsFolded replaces the isfolded associated with this Location.

func (Location) SetMappingIndex

func (ms Location) SetMappingIndex(v uint64)

SetMappingIndex replaces the mappingindex associated with this Location.

func (Location) SetTypeIndex

func (ms Location) SetTypeIndex(v uint32)

SetTypeIndex replaces the typeindex associated with this Location.

func (Location) TypeIndex

func (ms Location) TypeIndex() uint32

TypeIndex returns the typeindex associated with this Location.

type LocationSlice

type LocationSlice struct {
	// contains filtered or unexported fields
}

LocationSlice logically represents a slice of Location.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewLocationSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewLocationSlice

func NewLocationSlice() LocationSlice

NewLocationSlice creates a LocationSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

func (LocationSlice) AppendEmpty

func (es LocationSlice) AppendEmpty() Location

AppendEmpty will append to the end of the slice an empty Location. It returns the newly added Location.

func (LocationSlice) At

func (es LocationSlice) At(i int) Location

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice:

for i := 0; i < es.Len(); i++ {
    e := es.At(i)
    ... // Do something with the element
}

func (LocationSlice) CopyTo

func (es LocationSlice) CopyTo(dest LocationSlice)

CopyTo copies all elements from the current slice overriding the destination.

func (LocationSlice) EnsureCapacity

func (es LocationSlice) EnsureCapacity(newCap int)

EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.

Here is how a new LocationSlice can be initialized:

es := NewLocationSlice()
es.EnsureCapacity(4)
for i := 0; i < 4; i++ {
    e := es.AppendEmpty()
    // Here should set all the values for e.
}

func (LocationSlice) Len

func (es LocationSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewLocationSlice()".

func (LocationSlice) MoveAndAppendTo

func (es LocationSlice) MoveAndAppendTo(dest LocationSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (LocationSlice) RemoveIf

func (es LocationSlice) RemoveIf(f func(Location) bool)

RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.

func (LocationSlice) Sort added in v0.111.0

func (es LocationSlice) Sort(less func(a, b Location) bool)

Sort sorts the Location elements within LocationSlice given the provided less function so that two instances of LocationSlice can be compared.

type Mapping

type Mapping struct {
	// contains filtered or unexported fields
}

Mapping describes the mapping of a binary in memory, including its address range, file offset, and metadata like build ID

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewMapping function to create new instances. Important: zero-initialized instance is not valid for use.

func NewMapping

func NewMapping() Mapping

NewMapping creates a new empty Mapping.

This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.

func (Mapping) Attributes

func (ms Mapping) Attributes() pcommon.UInt64Slice

Attributes returns the Attributes associated with this Mapping.

func (Mapping) BuildID

func (ms Mapping) BuildID() int64

BuildID returns the buildid associated with this Mapping.

func (Mapping) BuildIDKind

func (ms Mapping) BuildIDKind() otlpprofiles.BuildIdKind

BuildIDKind returns the buildidkind associated with this Mapping.

func (Mapping) CopyTo

func (ms Mapping) CopyTo(dest Mapping)

CopyTo copies all properties from the current struct overriding the destination.

func (Mapping) FileOffset

func (ms Mapping) FileOffset() uint64

FileOffset returns the fileoffset associated with this Mapping.

func (Mapping) Filename

func (ms Mapping) Filename() int64

Filename returns the filename associated with this Mapping.

func (Mapping) HasFilenames

func (ms Mapping) HasFilenames() bool

HasFilenames returns the hasfilenames associated with this Mapping.

func (Mapping) HasFunctions

func (ms Mapping) HasFunctions() bool

HasFunctions returns the hasfunctions associated with this Mapping.

func (Mapping) HasInlineFrames

func (ms Mapping) HasInlineFrames() bool

HasInlineFrames returns the hasinlineframes associated with this Mapping.

func (Mapping) HasLineNumbers

func (ms Mapping) HasLineNumbers() bool

HasLineNumbers returns the haslinenumbers associated with this Mapping.

func (Mapping) ID

func (ms Mapping) ID() uint64

ID returns the id associated with this Mapping.

func (Mapping) MemoryLimit

func (ms Mapping) MemoryLimit() uint64

MemoryLimit returns the memorylimit associated with this Mapping.

func (Mapping) MemoryStart

func (ms Mapping) MemoryStart() uint64

MemoryStart returns the memorystart associated with this Mapping.

func (Mapping) MoveTo

func (ms Mapping) MoveTo(dest Mapping)

MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value

func (Mapping) SetBuildID

func (ms Mapping) SetBuildID(v int64)

SetBuildID replaces the buildid associated with this Mapping.

func (Mapping) SetBuildIDKind

func (ms Mapping) SetBuildIDKind(v otlpprofiles.BuildIdKind)

SetBuildIDKind replaces the buildidkind associated with this Mapping.

func (Mapping) SetFileOffset

func (ms Mapping) SetFileOffset(v uint64)

SetFileOffset replaces the fileoffset associated with this Mapping.

func (Mapping) SetFilename

func (ms Mapping) SetFilename(v int64)

SetFilename replaces the filename associated with this Mapping.

func (Mapping) SetHasFilenames

func (ms Mapping) SetHasFilenames(v bool)

SetHasFilenames replaces the hasfilenames associated with this Mapping.

func (Mapping) SetHasFunctions

func (ms Mapping) SetHasFunctions(v bool)

SetHasFunctions replaces the hasfunctions associated with this Mapping.

func (Mapping) SetHasInlineFrames

func (ms Mapping) SetHasInlineFrames(v bool)

SetHasInlineFrames replaces the hasinlineframes associated with this Mapping.

func (Mapping) SetHasLineNumbers

func (ms Mapping) SetHasLineNumbers(v bool)

SetHasLineNumbers replaces the haslinenumbers associated with this Mapping.

func (Mapping) SetID

func (ms Mapping) SetID(v uint64)

SetID replaces the id associated with this Mapping.

func (Mapping) SetMemoryLimit

func (ms Mapping) SetMemoryLimit(v uint64)

SetMemoryLimit replaces the memorylimit associated with this Mapping.

func (Mapping) SetMemoryStart

func (ms Mapping) SetMemoryStart(v uint64)

SetMemoryStart replaces the memorystart associated with this Mapping.

type MappingSlice

type MappingSlice struct {
	// contains filtered or unexported fields
}

MappingSlice logically represents a slice of Mapping.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewMappingSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewMappingSlice

func NewMappingSlice() MappingSlice

NewMappingSlice creates a MappingSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

func (MappingSlice) AppendEmpty

func (es MappingSlice) AppendEmpty() Mapping

AppendEmpty will append to the end of the slice an empty Mapping. It returns the newly added Mapping.

func (MappingSlice) At

func (es MappingSlice) At(i int) Mapping

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice:

for i := 0; i < es.Len(); i++ {
    e := es.At(i)
    ... // Do something with the element
}

func (MappingSlice) CopyTo

func (es MappingSlice) CopyTo(dest MappingSlice)

CopyTo copies all elements from the current slice overriding the destination.

func (MappingSlice) EnsureCapacity

func (es MappingSlice) EnsureCapacity(newCap int)

EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.

Here is how a new MappingSlice can be initialized:

es := NewMappingSlice()
es.EnsureCapacity(4)
for i := 0; i < 4; i++ {
    e := es.AppendEmpty()
    // Here should set all the values for e.
}

func (MappingSlice) Len

func (es MappingSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewMappingSlice()".

func (MappingSlice) MoveAndAppendTo

func (es MappingSlice) MoveAndAppendTo(dest MappingSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (MappingSlice) RemoveIf

func (es MappingSlice) RemoveIf(f func(Mapping) bool)

RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.

func (MappingSlice) Sort added in v0.111.0

func (es MappingSlice) Sort(less func(a, b Mapping) bool)

Sort sorts the Mapping elements within MappingSlice given the provided less function so that two instances of MappingSlice can be compared.

type MarshalSizer added in v0.109.0

type MarshalSizer interface {
	Marshaler
	Sizer
}

MarshalSizer is the interface that groups the basic Marshal and Size methods

type Marshaler added in v0.109.0

type Marshaler interface {
	// MarshalProfiles the given pprofile.Profiles into bytes.
	// If the error is not nil, the returned bytes slice cannot be used.
	MarshalProfiles(td Profiles) ([]byte, error)
}

Marshaler marshals pprofile.Profiles into bytes.

type Profile

type Profile struct {
	// contains filtered or unexported fields
}

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewProfile function to create new instances. Important: zero-initialized instance is not valid for use.

func NewProfile

func NewProfile() Profile

NewProfile creates a new empty Profile.

This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.

func (Profile) AttributeTable

func (ms Profile) AttributeTable() pcommon.Map

AttributeTable returns the AttributeTable associated with this Profile.

func (Profile) AttributeUnits

func (ms Profile) AttributeUnits() AttributeUnitSlice

AttributeUnits returns the AttributeUnits associated with this Profile.

func (Profile) Comment

func (ms Profile) Comment() pcommon.Int64Slice

Comment returns the Comment associated with this Profile.

func (Profile) CopyTo

func (ms Profile) CopyTo(dest Profile)

CopyTo copies all properties from the current struct overriding the destination.

func (Profile) DefaultSampleType

func (ms Profile) DefaultSampleType() int64

DefaultSampleType returns the defaultsampletype associated with this Profile.

func (Profile) DropFrames

func (ms Profile) DropFrames() int64

DropFrames returns the dropframes associated with this Profile.

func (Profile) Duration

func (ms Profile) Duration() pcommon.Timestamp

Duration returns the duration associated with this Profile.

func (Profile) Function

func (ms Profile) Function() FunctionSlice

Function returns the Function associated with this Profile.

func (Profile) KeepFrames

func (ms Profile) KeepFrames() int64

KeepFrames returns the keepframes associated with this Profile.

func (Profile) LinkTable

func (ms Profile) LinkTable() LinkSlice

LinkTable returns the LinkTable associated with this Profile.

func (Profile) Location

func (ms Profile) Location() LocationSlice

Location returns the Location associated with this Profile.

func (Profile) LocationIndices

func (ms Profile) LocationIndices() pcommon.Int64Slice

LocationIndices returns the LocationIndices associated with this Profile.

func (Profile) Mapping

func (ms Profile) Mapping() MappingSlice

Mapping returns the Mapping associated with this Profile.

func (Profile) MoveTo

func (ms Profile) MoveTo(dest Profile)

MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value

func (Profile) Period

func (ms Profile) Period() int64

Period returns the period associated with this Profile.

func (Profile) PeriodType

func (ms Profile) PeriodType() ValueType

PeriodType returns the periodtype associated with this Profile.

func (Profile) Sample

func (ms Profile) Sample() SampleSlice

Sample returns the Sample associated with this Profile.

func (Profile) SampleType

func (ms Profile) SampleType() ValueTypeSlice

SampleType returns the SampleType associated with this Profile.

func (Profile) SetDefaultSampleType

func (ms Profile) SetDefaultSampleType(v int64)

SetDefaultSampleType replaces the defaultsampletype associated with this Profile.

func (Profile) SetDropFrames

func (ms Profile) SetDropFrames(v int64)

SetDropFrames replaces the dropframes associated with this Profile.

func (Profile) SetDuration

func (ms Profile) SetDuration(v pcommon.Timestamp)

SetDuration replaces the duration associated with this Profile.

func (Profile) SetKeepFrames

func (ms Profile) SetKeepFrames(v int64)

SetKeepFrames replaces the keepframes associated with this Profile.

func (Profile) SetPeriod

func (ms Profile) SetPeriod(v int64)

SetPeriod replaces the period associated with this Profile.

func (Profile) SetStartTime

func (ms Profile) SetStartTime(v pcommon.Timestamp)

SetStartTime replaces the starttime associated with this Profile.

func (Profile) StartTime

func (ms Profile) StartTime() pcommon.Timestamp

StartTime returns the starttime associated with this Profile.

func (Profile) StringTable

func (ms Profile) StringTable() pcommon.StringSlice

StringTable returns the StringTable associated with this Profile.

type ProfileContainer

type ProfileContainer struct {
	// contains filtered or unexported fields
}

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewProfileContainer function to create new instances. Important: zero-initialized instance is not valid for use.

func NewProfileContainer

func NewProfileContainer() ProfileContainer

NewProfileContainer creates a new empty ProfileContainer.

This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.

func (ProfileContainer) Attributes

func (ms ProfileContainer) Attributes() pcommon.Map

Attributes returns the Attributes associated with this ProfileContainer.

func (ProfileContainer) CopyTo

func (ms ProfileContainer) CopyTo(dest ProfileContainer)

CopyTo copies all properties from the current struct overriding the destination.

func (ProfileContainer) DroppedAttributesCount

func (ms ProfileContainer) DroppedAttributesCount() uint32

DroppedAttributesCount returns the droppedattributescount associated with this ProfileContainer.

func (ProfileContainer) EndTime

func (ms ProfileContainer) EndTime() pcommon.Timestamp

EndTime returns the endtime associated with this ProfileContainer.

func (ProfileContainer) MoveTo

func (ms ProfileContainer) MoveTo(dest ProfileContainer)

MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value

func (ProfileContainer) Profile

func (ms ProfileContainer) Profile() Profile

Profile returns the profile associated with this ProfileContainer.

func (ProfileContainer) ProfileID

func (ms ProfileContainer) ProfileID() ProfileID

ProfileID returns the profileid associated with this ProfileContainer.

func (ProfileContainer) SetDroppedAttributesCount

func (ms ProfileContainer) SetDroppedAttributesCount(v uint32)

SetDroppedAttributesCount replaces the droppedattributescount associated with this ProfileContainer.

func (ProfileContainer) SetEndTime

func (ms ProfileContainer) SetEndTime(v pcommon.Timestamp)

SetEndTime replaces the endtime associated with this ProfileContainer.

func (ProfileContainer) SetProfileID added in v0.109.0

func (ms ProfileContainer) SetProfileID(v ProfileID)

SetProfileID replaces the profileid associated with this ProfileContainer.

func (ProfileContainer) SetStartTime

func (ms ProfileContainer) SetStartTime(v pcommon.Timestamp)

SetStartTime replaces the starttime associated with this ProfileContainer.

func (ProfileContainer) StartTime

func (ms ProfileContainer) StartTime() pcommon.Timestamp

StartTime returns the starttime associated with this ProfileContainer.

type ProfileID added in v0.109.0

type ProfileID [16]byte

ProfileID is a profile identifier.

func NewProfileIDEmpty added in v0.109.0

func NewProfileIDEmpty() ProfileID

NewProfileIDEmpty returns a new empty (all zero bytes) ProfileID.

func (ProfileID) IsEmpty added in v0.109.0

func (ms ProfileID) IsEmpty() bool

IsEmpty returns true if id doesn't contain at least one non-zero byte.

func (ProfileID) String added in v0.109.0

func (ms ProfileID) String() string

String returns string representation of the ProifleID.

Important: Don't rely on this method to get a string identifier of ProfileID. Use hex.EncodeToString explicitly instead. This method is meant to implement Stringer interface for display purposes only.

type Profiles added in v0.104.0

type Profiles internal.Profiles

profiles is the top-level struct that is propagated through the profiles pipeline. Use NewProfiles to create new instance, zero-initialized instance is not valid for use.

func NewProfiles added in v0.104.0

func NewProfiles() Profiles

NewProfiles creates a new Profiles struct.

func (Profiles) CopyTo added in v0.104.0

func (ms Profiles) CopyTo(dest Profiles)

CopyTo copies the Profiles instance overriding the destination.

func (Profiles) IsReadOnly added in v0.104.0

func (ms Profiles) IsReadOnly() bool

IsReadOnly returns true if this ResourceProfiles instance is read-only.

func (Profiles) MarkReadOnly added in v0.104.0

func (ms Profiles) MarkReadOnly()

MarkReadOnly marks the ResourceProfiles as shared so that no further modifications can be done on it.

func (Profiles) ResourceProfiles added in v0.104.0

func (ms Profiles) ResourceProfiles() ResourceProfilesSlice

ResourceProfiles returns the ResourceProfilesSlice associated with this Profiles.

func (Profiles) SampleCount added in v0.109.0

func (ms Profiles) SampleCount() int

SampleCount calculates the total number of samples.

type ProfilesContainersSlice

type ProfilesContainersSlice struct {
	// contains filtered or unexported fields
}

ProfilesContainersSlice logically represents a slice of ProfileContainer.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewProfilesContainersSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewProfilesContainersSlice

func NewProfilesContainersSlice() ProfilesContainersSlice

NewProfilesContainersSlice creates a ProfilesContainersSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

func (ProfilesContainersSlice) AppendEmpty

func (es ProfilesContainersSlice) AppendEmpty() ProfileContainer

AppendEmpty will append to the end of the slice an empty ProfileContainer. It returns the newly added ProfileContainer.

func (ProfilesContainersSlice) At

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice:

for i := 0; i < es.Len(); i++ {
    e := es.At(i)
    ... // Do something with the element
}

func (ProfilesContainersSlice) CopyTo

CopyTo copies all elements from the current slice overriding the destination.

func (ProfilesContainersSlice) EnsureCapacity

func (es ProfilesContainersSlice) EnsureCapacity(newCap int)

EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.

Here is how a new ProfilesContainersSlice can be initialized:

es := NewProfilesContainersSlice()
es.EnsureCapacity(4)
for i := 0; i < 4; i++ {
    e := es.AppendEmpty()
    // Here should set all the values for e.
}

func (ProfilesContainersSlice) Len

func (es ProfilesContainersSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewProfilesContainersSlice()".

func (ProfilesContainersSlice) MoveAndAppendTo

func (es ProfilesContainersSlice) MoveAndAppendTo(dest ProfilesContainersSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (ProfilesContainersSlice) RemoveIf

func (es ProfilesContainersSlice) RemoveIf(f func(ProfileContainer) bool)

RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.

func (ProfilesContainersSlice) Sort

func (es ProfilesContainersSlice) Sort(less func(a, b ProfileContainer) bool)

Sort sorts the ProfileContainer elements within ProfilesContainersSlice given the provided less function so that two instances of ProfilesContainersSlice can be compared.

type ProtoMarshaler added in v0.110.0

type ProtoMarshaler struct{}

func (*ProtoMarshaler) MarshalProfiles added in v0.110.0

func (e *ProtoMarshaler) MarshalProfiles(td Profiles) ([]byte, error)

func (*ProtoMarshaler) ProfilesSize added in v0.110.0

func (e *ProtoMarshaler) ProfilesSize(td Profiles) int

type ProtoUnmarshaler added in v0.110.0

type ProtoUnmarshaler struct{}

func (*ProtoUnmarshaler) UnmarshalProfiles added in v0.110.0

func (d *ProtoUnmarshaler) UnmarshalProfiles(buf []byte) (Profiles, error)

type ResourceProfiles

type ResourceProfiles struct {
	// contains filtered or unexported fields
}

ResourceProfiles is a collection of profiles from a Resource.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewResourceProfiles function to create new instances. Important: zero-initialized instance is not valid for use.

func NewResourceProfiles

func NewResourceProfiles() ResourceProfiles

NewResourceProfiles creates a new empty ResourceProfiles.

This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.

func (ResourceProfiles) CopyTo

func (ms ResourceProfiles) CopyTo(dest ResourceProfiles)

CopyTo copies all properties from the current struct overriding the destination.

func (ResourceProfiles) MoveTo

func (ms ResourceProfiles) MoveTo(dest ResourceProfiles)

MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value

func (ResourceProfiles) Resource

func (ms ResourceProfiles) Resource() pcommon.Resource

Resource returns the resource associated with this ResourceProfiles.

func (ResourceProfiles) SchemaUrl

func (ms ResourceProfiles) SchemaUrl() string

SchemaUrl returns the schemaurl associated with this ResourceProfiles.

func (ResourceProfiles) ScopeProfiles

func (ms ResourceProfiles) ScopeProfiles() ScopeProfilesSlice

ScopeProfiles returns the ScopeProfiles associated with this ResourceProfiles.

func (ResourceProfiles) SetSchemaUrl

func (ms ResourceProfiles) SetSchemaUrl(v string)

SetSchemaUrl replaces the schemaurl associated with this ResourceProfiles.

type ResourceProfilesSlice

type ResourceProfilesSlice struct {
	// contains filtered or unexported fields
}

ResourceProfilesSlice logically represents a slice of ResourceProfiles.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewResourceProfilesSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewResourceProfilesSlice

func NewResourceProfilesSlice() ResourceProfilesSlice

NewResourceProfilesSlice creates a ResourceProfilesSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

func (ResourceProfilesSlice) AppendEmpty

func (es ResourceProfilesSlice) AppendEmpty() ResourceProfiles

AppendEmpty will append to the end of the slice an empty ResourceProfiles. It returns the newly added ResourceProfiles.

func (ResourceProfilesSlice) At

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice:

for i := 0; i < es.Len(); i++ {
    e := es.At(i)
    ... // Do something with the element
}

func (ResourceProfilesSlice) CopyTo

CopyTo copies all elements from the current slice overriding the destination.

func (ResourceProfilesSlice) EnsureCapacity

func (es ResourceProfilesSlice) EnsureCapacity(newCap int)

EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.

Here is how a new ResourceProfilesSlice can be initialized:

es := NewResourceProfilesSlice()
es.EnsureCapacity(4)
for i := 0; i < 4; i++ {
    e := es.AppendEmpty()
    // Here should set all the values for e.
}

func (ResourceProfilesSlice) Len

func (es ResourceProfilesSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewResourceProfilesSlice()".

func (ResourceProfilesSlice) MoveAndAppendTo

func (es ResourceProfilesSlice) MoveAndAppendTo(dest ResourceProfilesSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (ResourceProfilesSlice) RemoveIf

func (es ResourceProfilesSlice) RemoveIf(f func(ResourceProfiles) bool)

RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.

func (ResourceProfilesSlice) Sort

func (es ResourceProfilesSlice) Sort(less func(a, b ResourceProfiles) bool)

Sort sorts the ResourceProfiles elements within ResourceProfilesSlice given the provided less function so that two instances of ResourceProfilesSlice can be compared.

type Sample

type Sample struct {
	// contains filtered or unexported fields
}

Sample represents each record value encountered within a profiled program.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewSample function to create new instances. Important: zero-initialized instance is not valid for use.

func NewSample

func NewSample() Sample

NewSample creates a new empty Sample.

This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.

func (Sample) Attributes

func (ms Sample) Attributes() pcommon.UInt64Slice

Attributes returns the Attributes associated with this Sample.

func (Sample) CopyTo

func (ms Sample) CopyTo(dest Sample)

CopyTo copies all properties from the current struct overriding the destination.

func (Sample) Label

func (ms Sample) Label() LabelSlice

Label returns the Label associated with this Sample.

func (ms Sample) Link() uint64

Link returns the link associated with this Sample.

func (Sample) LocationIndex

func (ms Sample) LocationIndex() pcommon.UInt64Slice

LocationIndex returns the LocationIndex associated with this Sample.

func (Sample) LocationsLength

func (ms Sample) LocationsLength() uint64

LocationsLength returns the locationslength associated with this Sample.

func (Sample) LocationsStartIndex

func (ms Sample) LocationsStartIndex() uint64

LocationsStartIndex returns the locationsstartindex associated with this Sample.

func (Sample) MoveTo

func (ms Sample) MoveTo(dest Sample)

MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value

func (ms Sample) SetLink(v uint64)

SetLink replaces the link associated with this Sample.

func (Sample) SetLocationsLength

func (ms Sample) SetLocationsLength(v uint64)

SetLocationsLength replaces the locationslength associated with this Sample.

func (Sample) SetLocationsStartIndex

func (ms Sample) SetLocationsStartIndex(v uint64)

SetLocationsStartIndex replaces the locationsstartindex associated with this Sample.

func (Sample) SetStacktraceIdIndex

func (ms Sample) SetStacktraceIdIndex(v uint32)

SetStacktraceIdIndex replaces the stacktraceidindex associated with this Sample.

func (Sample) StacktraceIdIndex

func (ms Sample) StacktraceIdIndex() uint32

StacktraceIdIndex returns the stacktraceidindex associated with this Sample.

func (Sample) TimestampsUnixNano

func (ms Sample) TimestampsUnixNano() pcommon.UInt64Slice

TimestampsUnixNano returns the TimestampsUnixNano associated with this Sample.

func (Sample) Value

func (ms Sample) Value() pcommon.Int64Slice

Value returns the Value associated with this Sample.

type SampleSlice

type SampleSlice struct {
	// contains filtered or unexported fields
}

SampleSlice logically represents a slice of Sample.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewSampleSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewSampleSlice

func NewSampleSlice() SampleSlice

NewSampleSlice creates a SampleSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

func (SampleSlice) AppendEmpty

func (es SampleSlice) AppendEmpty() Sample

AppendEmpty will append to the end of the slice an empty Sample. It returns the newly added Sample.

func (SampleSlice) At

func (es SampleSlice) At(i int) Sample

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice:

for i := 0; i < es.Len(); i++ {
    e := es.At(i)
    ... // Do something with the element
}

func (SampleSlice) CopyTo

func (es SampleSlice) CopyTo(dest SampleSlice)

CopyTo copies all elements from the current slice overriding the destination.

func (SampleSlice) EnsureCapacity

func (es SampleSlice) EnsureCapacity(newCap int)

EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.

Here is how a new SampleSlice can be initialized:

es := NewSampleSlice()
es.EnsureCapacity(4)
for i := 0; i < 4; i++ {
    e := es.AppendEmpty()
    // Here should set all the values for e.
}

func (SampleSlice) Len

func (es SampleSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewSampleSlice()".

func (SampleSlice) MoveAndAppendTo

func (es SampleSlice) MoveAndAppendTo(dest SampleSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (SampleSlice) RemoveIf

func (es SampleSlice) RemoveIf(f func(Sample) bool)

RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.

func (SampleSlice) Sort added in v0.111.0

func (es SampleSlice) Sort(less func(a, b Sample) bool)

Sort sorts the Sample elements within SampleSlice given the provided less function so that two instances of SampleSlice can be compared.

type ScopeProfiles

type ScopeProfiles struct {
	// contains filtered or unexported fields
}

ScopeProfiles is a collection of profiles from a LibraryInstrumentation.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewScopeProfiles function to create new instances. Important: zero-initialized instance is not valid for use.

func NewScopeProfiles

func NewScopeProfiles() ScopeProfiles

NewScopeProfiles creates a new empty ScopeProfiles.

This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.

func (ScopeProfiles) CopyTo

func (ms ScopeProfiles) CopyTo(dest ScopeProfiles)

CopyTo copies all properties from the current struct overriding the destination.

func (ScopeProfiles) MoveTo

func (ms ScopeProfiles) MoveTo(dest ScopeProfiles)

MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value

func (ScopeProfiles) Profiles

func (ms ScopeProfiles) Profiles() ProfilesContainersSlice

Profiles returns the Profiles associated with this ScopeProfiles.

func (ScopeProfiles) SchemaUrl

func (ms ScopeProfiles) SchemaUrl() string

SchemaUrl returns the schemaurl associated with this ScopeProfiles.

func (ScopeProfiles) Scope

Scope returns the scope associated with this ScopeProfiles.

func (ScopeProfiles) SetSchemaUrl

func (ms ScopeProfiles) SetSchemaUrl(v string)

SetSchemaUrl replaces the schemaurl associated with this ScopeProfiles.

type ScopeProfilesSlice

type ScopeProfilesSlice struct {
	// contains filtered or unexported fields
}

ScopeProfilesSlice logically represents a slice of ScopeProfiles.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewScopeProfilesSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewScopeProfilesSlice

func NewScopeProfilesSlice() ScopeProfilesSlice

NewScopeProfilesSlice creates a ScopeProfilesSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

func (ScopeProfilesSlice) AppendEmpty

func (es ScopeProfilesSlice) AppendEmpty() ScopeProfiles

AppendEmpty will append to the end of the slice an empty ScopeProfiles. It returns the newly added ScopeProfiles.

func (ScopeProfilesSlice) At

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice:

for i := 0; i < es.Len(); i++ {
    e := es.At(i)
    ... // Do something with the element
}

func (ScopeProfilesSlice) CopyTo

func (es ScopeProfilesSlice) CopyTo(dest ScopeProfilesSlice)

CopyTo copies all elements from the current slice overriding the destination.

func (ScopeProfilesSlice) EnsureCapacity

func (es ScopeProfilesSlice) EnsureCapacity(newCap int)

EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.

Here is how a new ScopeProfilesSlice can be initialized:

es := NewScopeProfilesSlice()
es.EnsureCapacity(4)
for i := 0; i < 4; i++ {
    e := es.AppendEmpty()
    // Here should set all the values for e.
}

func (ScopeProfilesSlice) Len

func (es ScopeProfilesSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewScopeProfilesSlice()".

func (ScopeProfilesSlice) MoveAndAppendTo

func (es ScopeProfilesSlice) MoveAndAppendTo(dest ScopeProfilesSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (ScopeProfilesSlice) RemoveIf

func (es ScopeProfilesSlice) RemoveIf(f func(ScopeProfiles) bool)

RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.

func (ScopeProfilesSlice) Sort

func (es ScopeProfilesSlice) Sort(less func(a, b ScopeProfiles) bool)

Sort sorts the ScopeProfiles elements within ScopeProfilesSlice given the provided less function so that two instances of ScopeProfilesSlice can be compared.

type Sizer added in v0.109.0

type Sizer interface {
	// ProfilesSize returns the size in bytes of a marshaled Profiles.
	ProfilesSize(td Profiles) int
}

Sizer is an optional interface implemented by the Marshaler, that calculates the size of a marshaled Profiles.

type Unmarshaler added in v0.109.0

type Unmarshaler interface {
	// UnmarshalProfiles the given bytes into pprofile.Profiles.
	// If the error is not nil, the returned pprofile.Profiles cannot be used.
	UnmarshalProfiles(buf []byte) (Profiles, error)
}

Unmarshaler unmarshalls bytes into pprofile.Profiles.

type ValueType

type ValueType struct {
	// contains filtered or unexported fields
}

ValueType describes the type and units of a value, with an optional aggregation temporality.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewValueType function to create new instances. Important: zero-initialized instance is not valid for use.

func NewValueType

func NewValueType() ValueType

NewValueType creates a new empty ValueType.

This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.

func (ValueType) AggregationTemporality

func (ms ValueType) AggregationTemporality() otlpprofiles.AggregationTemporality

AggregationTemporality returns the aggregationtemporality associated with this ValueType.

func (ValueType) CopyTo

func (ms ValueType) CopyTo(dest ValueType)

CopyTo copies all properties from the current struct overriding the destination.

func (ValueType) MoveTo

func (ms ValueType) MoveTo(dest ValueType)

MoveTo moves all properties from the current struct overriding the destination and resetting the current instance to its zero value

func (ValueType) SetAggregationTemporality

func (ms ValueType) SetAggregationTemporality(v otlpprofiles.AggregationTemporality)

SetAggregationTemporality replaces the aggregationtemporality associated with this ValueType.

func (ValueType) SetType

func (ms ValueType) SetType(v int64)

SetType replaces the type associated with this ValueType.

func (ValueType) SetUnit

func (ms ValueType) SetUnit(v int64)

SetUnit replaces the unit associated with this ValueType.

func (ValueType) Type

func (ms ValueType) Type() int64

Type returns the type associated with this ValueType.

func (ValueType) Unit

func (ms ValueType) Unit() int64

Unit returns the unit associated with this ValueType.

type ValueTypeSlice

type ValueTypeSlice struct {
	// contains filtered or unexported fields
}

ValueTypeSlice logically represents a slice of ValueType.

This is a reference type. If passed by value and callee modifies it, the caller will see the modification.

Must use NewValueTypeSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewValueTypeSlice

func NewValueTypeSlice() ValueTypeSlice

NewValueTypeSlice creates a ValueTypeSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

func (ValueTypeSlice) AppendEmpty

func (es ValueTypeSlice) AppendEmpty() ValueType

AppendEmpty will append to the end of the slice an empty ValueType. It returns the newly added ValueType.

func (ValueTypeSlice) At

func (es ValueTypeSlice) At(i int) ValueType

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice:

for i := 0; i < es.Len(); i++ {
    e := es.At(i)
    ... // Do something with the element
}

func (ValueTypeSlice) CopyTo

func (es ValueTypeSlice) CopyTo(dest ValueTypeSlice)

CopyTo copies all elements from the current slice overriding the destination.

func (ValueTypeSlice) EnsureCapacity

func (es ValueTypeSlice) EnsureCapacity(newCap int)

EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.

Here is how a new ValueTypeSlice can be initialized:

es := NewValueTypeSlice()
es.EnsureCapacity(4)
for i := 0; i < 4; i++ {
    e := es.AppendEmpty()
    // Here should set all the values for e.
}

func (ValueTypeSlice) Len

func (es ValueTypeSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewValueTypeSlice()".

func (ValueTypeSlice) MoveAndAppendTo

func (es ValueTypeSlice) MoveAndAppendTo(dest ValueTypeSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (ValueTypeSlice) RemoveIf

func (es ValueTypeSlice) RemoveIf(f func(ValueType) bool)

RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.

func (ValueTypeSlice) Sort added in v0.111.0

func (es ValueTypeSlice) Sort(less func(a, b ValueType) bool)

Sort sorts the ValueType elements within ValueTypeSlice given the provided less function so that two instances of ValueTypeSlice can be compared.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL