pprofile

package module
v0.138.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 License: Apache-2.0 Imports: 15 Imported by: 40

Documentation

Index

Constants

View Source
const (
	// AggregationTemporalityUnspecified is the default AggregationTemporality, it MUST NOT be used.
	AggregationTemporalityUnspecified = AggregationTemporality(otlpprofiles.AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED)
	// AggregationTemporalityDelta is a AggregationTemporality for a metric aggregator which reports changes since last report time.
	AggregationTemporalityDelta = AggregationTemporality(otlpprofiles.AggregationTemporality_AGGREGATION_TEMPORALITY_DELTA)
	// AggregationTemporalityCumulative is a AggregationTemporality for a metric aggregator which reports changes since a fixed start time.
	AggregationTemporalityCumulative = AggregationTemporality(otlpprofiles.AggregationTemporality_AGGREGATION_TEMPORALITY_CUMULATIVE)
)

Variables

This section is empty.

Functions

func FromAttributeIndices added in v0.119.0

func FromAttributeIndices(table KeyValueAndUnitSlice, record attributable, dic ProfilesDictionary) pcommon.Map

FromAttributeIndices builds a pcommon.Map containing the attributes of a record. The record can be any struct that implements an `AttributeIndices` method. Updates made to the return map will not be applied back to the record.

func PutAttribute deprecated added in v0.127.0

func PutAttribute(table KeyValueAndUnitSlice, record attributable, dic ProfilesDictionary, key string, value pcommon.Value) error

PutAttribute updates an AttributeTable and a record's AttributeIndices to add or update an attribute. The assumption is that attributes are a map as for other signals (metrics, logs, etc.), thus the same key must not appear twice in a list of attributes / attribute indices. The record can be any struct that implements an `AttributeIndices` method.

Deprecated: [v0.138.0] use SetAttribute instead.

func PutLocation deprecated added in v0.129.0

func PutLocation(table LocationSlice, record Stack, loc Location) error

PutLocation updates a LocationTable and a Stack's LocationIndices to add or update a location.

Deprecated: [v0.138.0] use SetLocation instead.

func SetAttribute added in v0.138.0

func SetAttribute(table KeyValueAndUnitSlice, attr KeyValueAndUnit) (int32, error)

SetAttribute updates an AttributeTable, adding or providing a value and returns its index.

func SetFunction added in v0.131.0

func SetFunction(table FunctionSlice, record Line, fn Function) error

SetFunction updates a FunctionTable and a Line's FunctionIndex to add or update a function.

func SetLink(table LinkSlice, record Sample, li Link) error

SetLink updates a LinkTable and a Sample's LinkIndex to add or update a link.

func SetLocation added in v0.138.0

func SetLocation(table LocationSlice, loc Location) (int32, error)

SetLocation updates a LocationTable, adding or providing a value and returns its index.

func SetMapping added in v0.129.0

func SetMapping(table MappingSlice, record Location, ma Mapping) error

SetMapping updates a MappingTable and a Location's MappingIndex to add or update a mapping.

func SetString added in v0.131.0

func SetString(table pcommon.StringSlice, val string) (int32, error)

SetString updates a StringTable, adding or providing a value and returns its index.

Types

type AggregationTemporality added in v0.120.0

type AggregationTemporality int32

AggregationTemporality specifies the method of aggregating metric values, either DELTA (change since last report) or CUMULATIVE (total since a fixed start time).

func (AggregationTemporality) String added in v0.120.0

func (at AggregationTemporality) String() string

String returns the string representation of the AggregationTemporality.

type Attribute added in v0.115.0

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

Attribute describes an attribute stored in a profile's attribute table.

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

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

func NewAttribute added in v0.115.0

func NewAttribute() Attribute

NewAttribute creates a new empty Attribute.

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 (Attribute) CopyTo added in v0.115.0

func (ms Attribute) CopyTo(dest Attribute)

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

func (Attribute) Key added in v0.115.0

func (ms Attribute) Key() string

Key returns the key associated with this Attribute.

func (Attribute) MoveTo added in v0.115.0

func (ms Attribute) MoveTo(dest Attribute)

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

func (Attribute) SetKey added in v0.115.0

func (ms Attribute) SetKey(v string)

SetKey replaces the key associated with this Attribute.

func (Attribute) Value added in v0.115.0

func (ms Attribute) Value() pcommon.Value

Value returns the value associated with this Attribute.

type AttributeTableSlice added in v0.115.0

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

AttributeTableSlice logically represents a slice of Attribute.

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

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

func NewAttributeTableSlice added in v0.115.0

func NewAttributeTableSlice() AttributeTableSlice

NewAttributeTableSlice creates a AttributeTableSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

func (AttributeTableSlice) All added in v0.122.0

All returns an iterator over index-value pairs in the slice.

for i, v := range es.All() {
    ... // Do something with index-value pair
}

func (AttributeTableSlice) AppendEmpty added in v0.115.0

func (es AttributeTableSlice) AppendEmpty() Attribute

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

func (AttributeTableSlice) At added in v0.115.0

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 (AttributeTableSlice) CopyTo added in v0.115.0

func (es AttributeTableSlice) CopyTo(dest AttributeTableSlice)

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

func (AttributeTableSlice) EnsureCapacity added in v0.115.0

func (es AttributeTableSlice) 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 AttributeTableSlice can be initialized:

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

func (AttributeTableSlice) Len added in v0.115.0

func (es AttributeTableSlice) Len() int

Len returns the number of elements in the slice.

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

func (AttributeTableSlice) MoveAndAppendTo added in v0.115.0

func (es AttributeTableSlice) MoveAndAppendTo(dest AttributeTableSlice)

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

func (AttributeTableSlice) RemoveIf added in v0.115.0

func (es AttributeTableSlice) RemoveIf(f func(Attribute) bool)

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

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) Equal added in v0.131.0

func (fn Function) Equal(val Function) bool

Equal checks equality with another Function

func (Function) FilenameStrindex added in v0.115.0

func (ms Function) FilenameStrindex() int32

FilenameStrindex returns the filenamestrindex 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) NameStrindex added in v0.115.0

func (ms Function) NameStrindex() int32

NameStrindex returns the namestrindex associated with this Function.

func (Function) SetFilenameStrindex added in v0.115.0

func (ms Function) SetFilenameStrindex(v int32)

SetFilenameStrindex replaces the filenamestrindex associated with this Function.

func (Function) SetNameStrindex added in v0.115.0

func (ms Function) SetNameStrindex(v int32)

SetNameStrindex replaces the namestrindex associated with this Function.

func (Function) SetStartLine

func (ms Function) SetStartLine(v int64)

SetStartLine replaces the startline associated with this Function.

func (Function) SetSystemNameStrindex added in v0.115.0

func (ms Function) SetSystemNameStrindex(v int32)

SetSystemNameStrindex replaces the systemnamestrindex associated with this Function.

func (Function) StartLine

func (ms Function) StartLine() int64

StartLine returns the startline associated with this Function.

func (Function) SystemNameStrindex added in v0.115.0

func (ms Function) SystemNameStrindex() int32

SystemNameStrindex returns the systemnamestrindex 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) All added in v0.122.0

func (es FunctionSlice) All() iter.Seq2[int, Function]

All returns an iterator over index-value pairs in the slice.

for i, v := range es.All() {
    ... // Do something with index-value pair
}

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(pd 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 KeyValueAndUnit added in v0.136.0

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

KeyValueAndUnit represents a custom 'dictionary native' style of encoding attributes which is more convenient for profiles than opentelemetry.proto.common.v1.KeyValue.

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

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

func NewKeyValueAndUnit added in v0.136.0

func NewKeyValueAndUnit() KeyValueAndUnit

NewKeyValueAndUnit creates a new empty KeyValueAndUnit.

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 (KeyValueAndUnit) CopyTo added in v0.136.0

func (ms KeyValueAndUnit) CopyTo(dest KeyValueAndUnit)

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

func (KeyValueAndUnit) Equal added in v0.138.0

func (ms KeyValueAndUnit) Equal(val KeyValueAndUnit) bool

Equal checks equality with another KeyValueAndUnit It assumes both structs refer to the same dictionary.

func (KeyValueAndUnit) KeyStrindex added in v0.136.0

func (ms KeyValueAndUnit) KeyStrindex() int32

KeyStrindex returns the keystrindex associated with this KeyValueAndUnit.

func (KeyValueAndUnit) MoveTo added in v0.136.0

func (ms KeyValueAndUnit) MoveTo(dest KeyValueAndUnit)

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

func (KeyValueAndUnit) SetKeyStrindex added in v0.136.0

func (ms KeyValueAndUnit) SetKeyStrindex(v int32)

SetKeyStrindex replaces the keystrindex associated with this KeyValueAndUnit.

func (KeyValueAndUnit) SetUnitStrindex added in v0.136.0

func (ms KeyValueAndUnit) SetUnitStrindex(v int32)

SetUnitStrindex replaces the unitstrindex associated with this KeyValueAndUnit.

func (KeyValueAndUnit) UnitStrindex added in v0.136.0

func (ms KeyValueAndUnit) UnitStrindex() int32

UnitStrindex returns the unitstrindex associated with this KeyValueAndUnit.

func (KeyValueAndUnit) Value added in v0.136.0

func (ms KeyValueAndUnit) Value() pcommon.Value

Value returns the value associated with this KeyValueAndUnit.

type KeyValueAndUnitSlice added in v0.136.0

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

KeyValueAndUnitSlice logically represents a slice of KeyValueAndUnit.

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

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

func NewKeyValueAndUnitSlice added in v0.136.0

func NewKeyValueAndUnitSlice() KeyValueAndUnitSlice

NewKeyValueAndUnitSlice creates a KeyValueAndUnitSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

func (KeyValueAndUnitSlice) All added in v0.136.0

All returns an iterator over index-value pairs in the slice.

for i, v := range es.All() {
    ... // Do something with index-value pair
}

func (KeyValueAndUnitSlice) AppendEmpty added in v0.136.0

func (es KeyValueAndUnitSlice) AppendEmpty() KeyValueAndUnit

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

func (KeyValueAndUnitSlice) At added in v0.136.0

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 (KeyValueAndUnitSlice) CopyTo added in v0.136.0

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

func (KeyValueAndUnitSlice) EnsureCapacity added in v0.136.0

func (es KeyValueAndUnitSlice) 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 KeyValueAndUnitSlice can be initialized:

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

func (KeyValueAndUnitSlice) Len added in v0.136.0

func (es KeyValueAndUnitSlice) Len() int

Len returns the number of elements in the slice.

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

func (KeyValueAndUnitSlice) MoveAndAppendTo added in v0.136.0

func (es KeyValueAndUnitSlice) MoveAndAppendTo(dest KeyValueAndUnitSlice)

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

func (KeyValueAndUnitSlice) RemoveIf added in v0.136.0

func (es KeyValueAndUnitSlice) RemoveIf(f func(KeyValueAndUnit) bool)

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

func (KeyValueAndUnitSlice) Sort added in v0.136.0

func (es KeyValueAndUnitSlice) Sort(less func(a, b KeyValueAndUnit) bool)

Sort sorts the KeyValueAndUnit elements within KeyValueAndUnitSlice given the provided less function so that two instances of KeyValueAndUnitSlice 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) Equal added in v0.129.0

func (l Line) Equal(val Line) bool

Equal checks equality with another Line

func (Line) FunctionIndex

func (ms Line) FunctionIndex() int32

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 int32)

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) All added in v0.122.0

func (es LineSlice) All() iter.Seq2[int, Line]

All returns an iterator over index-value pairs in the slice.

for i, v := range es.All() {
    ... // Do something with index-value pair
}

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) Equal added in v0.129.0

func (l LineSlice) Equal(val LineSlice) bool

Equal checks equality with another LineSlice

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) Equal added in v0.131.0

func (ms Link) Equal(val Link) bool

Equal checks equality with another Link

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) All added in v0.122.0

func (es LinkSlice) All() iter.Seq2[int, Link]

All returns an iterator over index-value pairs in the slice.

for i, v := range es.All() {
    ... // Do something with index-value pair
}

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) AttributeIndices added in v0.115.0

func (ms Location) AttributeIndices() pcommon.Int32Slice

AttributeIndices returns the AttributeIndices 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) Equal added in v0.129.0

func (ms Location) Equal(val Location) bool

Equal checks equality with another Location

func (Location) Line

func (ms Location) Line() LineSlice

Line returns the Line associated with this Location.

func (Location) MappingIndex

func (ms Location) MappingIndex() int32

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) SetMappingIndex

func (ms Location) SetMappingIndex(v int32)

SetMappingIndex replaces the mappingindex 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 FromLocationIndices added in v0.129.0

func FromLocationIndices(table LocationSlice, record Stack) LocationSlice

FromLocationIndices builds a slice containing all the locations of a Stack. Updates made to the returned map will not be applied back to the Stack.

func NewLocationSlice

func NewLocationSlice() LocationSlice

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

func (LocationSlice) All added in v0.122.0

func (es LocationSlice) All() iter.Seq2[int, Location]

All returns an iterator over index-value pairs in the slice.

for i, v := range es.All() {
    ... // Do something with index-value pair
}

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) AttributeIndices added in v0.115.0

func (ms Mapping) AttributeIndices() pcommon.Int32Slice

AttributeIndices returns the AttributeIndices 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) Equal added in v0.129.0

func (ms Mapping) Equal(val Mapping) bool

Equal checks equality with another Mapping

func (Mapping) FileOffset

func (ms Mapping) FileOffset() uint64

FileOffset returns the fileoffset associated with this Mapping.

func (Mapping) FilenameStrindex added in v0.115.0

func (ms Mapping) FilenameStrindex() int32

FilenameStrindex returns the filenamestrindex 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) SetFileOffset

func (ms Mapping) SetFileOffset(v uint64)

SetFileOffset replaces the fileoffset associated with this Mapping.

func (Mapping) SetFilenameStrindex added in v0.115.0

func (ms Mapping) SetFilenameStrindex(v int32)

SetFilenameStrindex replaces the filenamestrindex 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) All added in v0.122.0

func (es MappingSlice) All() iter.Seq2[int, Mapping]

All returns an iterator over index-value pairs in the slice.

for i, v := range es.All() {
    ... // Do something with index-value pair
}

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) AttributeIndices added in v0.117.0

func (ms Profile) AttributeIndices() pcommon.Int32Slice

AttributeIndices returns the AttributeIndices associated with this Profile.

func (Profile) CommentStrindices added in v0.115.0

func (ms Profile) CommentStrindices() pcommon.Int32Slice

CommentStrindices returns the CommentStrindices 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) DroppedAttributesCount added in v0.115.0

func (ms Profile) DroppedAttributesCount() uint32

DroppedAttributesCount returns the droppedattributescount associated with this Profile.

func (Profile) Duration

func (ms Profile) Duration() pcommon.Timestamp

Duration returns the duration 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) OriginalPayload added in v0.115.0

func (ms Profile) OriginalPayload() pcommon.ByteSlice

OriginalPayload returns the OriginalPayload associated with this Profile.

func (Profile) OriginalPayloadFormat added in v0.115.0

func (ms Profile) OriginalPayloadFormat() string

OriginalPayloadFormat returns the originalpayloadformat associated with this Profile.

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) ProfileID added in v0.115.0

func (ms Profile) ProfileID() ProfileID

ProfileID returns the profileid 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() ValueType

SampleType returns the sampletype associated with this Profile.

func (Profile) SetDroppedAttributesCount added in v0.115.0

func (ms Profile) SetDroppedAttributesCount(v uint32)

SetDroppedAttributesCount replaces the droppedattributescount associated with this Profile.

func (Profile) SetDuration

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

SetDuration replaces the duration associated with this Profile.

func (Profile) SetOriginalPayloadFormat added in v0.115.0

func (ms Profile) SetOriginalPayloadFormat(v string)

SetOriginalPayloadFormat replaces the originalpayloadformat associated with this Profile.

func (Profile) SetPeriod

func (ms Profile) SetPeriod(v int64)

SetPeriod replaces the period associated with this Profile.

func (Profile) SetProfileID added in v0.115.0

func (ms Profile) SetProfileID(v ProfileID)

SetProfileID replaces the profileid associated with this Profile.

func (Profile) SetTime added in v0.115.0

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

SetTime replaces the time associated with this Profile.

func (Profile) Time added in v0.115.0

func (ms Profile) Time() pcommon.Timestamp

Time returns the time associated with this Profile.

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 ProfileID.

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.

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

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

func NewProfiles added in v0.104.0

func NewProfiles() Profiles

NewProfiles creates a new empty Profiles.

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 (Profiles) CopyTo added in v0.104.0

func (ms Profiles) CopyTo(dest Profiles)

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

func (Profiles) Dictionary added in v0.133.0

func (ms Profiles) Dictionary() ProfilesDictionary

Dictionary returns the dictionary associated with this Profiles.

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) MoveTo added in v0.132.0

func (ms Profiles) MoveTo(dest Profiles)

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

func (Profiles) ResourceProfiles added in v0.104.0

func (ms Profiles) ResourceProfiles() ResourceProfilesSlice

ResourceProfiles returns the ResourceProfiles 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 ProfilesDictionary added in v0.128.0

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

ProfilesDictionary is the reference table containing all data shared by profiles across the message being sent.

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

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

func NewProfilesDictionary added in v0.128.0

func NewProfilesDictionary() ProfilesDictionary

NewProfilesDictionary creates a new empty ProfilesDictionary.

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 (ProfilesDictionary) AttributeTable added in v0.128.0

func (ms ProfilesDictionary) AttributeTable() KeyValueAndUnitSlice

AttributeTable returns the AttributeTable associated with this ProfilesDictionary.

func (ProfilesDictionary) CopyTo added in v0.128.0

func (ms ProfilesDictionary) CopyTo(dest ProfilesDictionary)

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

func (ProfilesDictionary) FunctionTable added in v0.128.0

func (ms ProfilesDictionary) FunctionTable() FunctionSlice

FunctionTable returns the FunctionTable associated with this ProfilesDictionary.

func (ProfilesDictionary) LinkTable added in v0.128.0

func (ms ProfilesDictionary) LinkTable() LinkSlice

LinkTable returns the LinkTable associated with this ProfilesDictionary.

func (ProfilesDictionary) LocationTable added in v0.128.0

func (ms ProfilesDictionary) LocationTable() LocationSlice

LocationTable returns the LocationTable associated with this ProfilesDictionary.

func (ProfilesDictionary) MappingTable added in v0.128.0

func (ms ProfilesDictionary) MappingTable() MappingSlice

MappingTable returns the MappingTable associated with this ProfilesDictionary.

func (ProfilesDictionary) MoveTo added in v0.128.0

func (ms ProfilesDictionary) MoveTo(dest ProfilesDictionary)

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

func (ProfilesDictionary) StackTable added in v0.136.0

func (ms ProfilesDictionary) StackTable() StackSlice

StackTable returns the StackTable associated with this ProfilesDictionary.

func (ProfilesDictionary) StringTable added in v0.128.0

func (ms ProfilesDictionary) StringTable() pcommon.StringSlice

StringTable returns the StringTable associated with this ProfilesDictionary.

type ProfilesSlice added in v0.115.0

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

ProfilesSlice logically represents a slice of Profile.

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

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

func NewProfilesSlice added in v0.115.0

func NewProfilesSlice() ProfilesSlice

NewProfilesSlice creates a ProfilesSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

func (ProfilesSlice) All added in v0.122.0

func (es ProfilesSlice) All() iter.Seq2[int, Profile]

All returns an iterator over index-value pairs in the slice.

for i, v := range es.All() {
    ... // Do something with index-value pair
}

func (ProfilesSlice) AppendEmpty added in v0.115.0

func (es ProfilesSlice) AppendEmpty() Profile

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

func (ProfilesSlice) At added in v0.115.0

func (es ProfilesSlice) At(i int) Profile

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 (ProfilesSlice) CopyTo added in v0.115.0

func (es ProfilesSlice) CopyTo(dest ProfilesSlice)

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

func (ProfilesSlice) EnsureCapacity added in v0.115.0

func (es ProfilesSlice) 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 ProfilesSlice can be initialized:

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

func (ProfilesSlice) Len added in v0.115.0

func (es ProfilesSlice) Len() int

Len returns the number of elements in the slice.

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

func (ProfilesSlice) MoveAndAppendTo added in v0.115.0

func (es ProfilesSlice) MoveAndAppendTo(dest ProfilesSlice)

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

func (ProfilesSlice) RemoveIf added in v0.115.0

func (es ProfilesSlice) RemoveIf(f func(Profile) bool)

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

func (ProfilesSlice) Sort added in v0.115.0

func (es ProfilesSlice) Sort(less func(a, b Profile) bool)

Sort sorts the Profile elements within ProfilesSlice given the provided less function so that two instances of ProfilesSlice 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(pd Profiles) ([]byte, error)

func (*ProtoMarshaler) ProfileSize added in v0.124.0

func (e *ProtoMarshaler) ProfileSize(pd Profile) int

func (*ProtoMarshaler) ProfilesSize added in v0.110.0

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

func (*ProtoMarshaler) ResourceProfilesSize added in v0.124.0

func (e *ProtoMarshaler) ResourceProfilesSize(pd ResourceProfiles) int

func (*ProtoMarshaler) ScopeProfilesSize added in v0.124.0

func (e *ProtoMarshaler) ScopeProfilesSize(pd ScopeProfiles) 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) All added in v0.122.0

All returns an iterator over index-value pairs in the slice.

for i, v := range es.All() {
    ... // Do something with index-value pair
}

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) AttributeIndices added in v0.115.0

func (ms Sample) AttributeIndices() pcommon.Int32Slice

AttributeIndices returns the AttributeIndices 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) LinkIndex added in v0.121.0

func (ms Sample) LinkIndex() int32

LinkIndex returns the linkindex 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 (Sample) SetLinkIndex added in v0.121.0

func (ms Sample) SetLinkIndex(v int32)

SetLinkIndex replaces the linkindex associated with this Sample.

func (Sample) SetStackIndex added in v0.136.0

func (ms Sample) SetStackIndex(v int32)

SetStackIndex replaces the stackindex associated with this Sample.

func (Sample) StackIndex added in v0.136.0

func (ms Sample) StackIndex() int32

StackIndex returns the stackindex associated with this Sample.

func (Sample) TimestampsUnixNano

func (ms Sample) TimestampsUnixNano() pcommon.UInt64Slice

TimestampsUnixNano returns the TimestampsUnixNano associated with this Sample.

func (Sample) Values added in v0.136.0

func (ms Sample) Values() pcommon.Int64Slice

Values returns the Values 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) All added in v0.122.0

func (es SampleSlice) All() iter.Seq2[int, Sample]

All returns an iterator over index-value pairs in the slice.

for i, v := range es.All() {
    ... // Do something with index-value pair
}

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() ProfilesSlice

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) All added in v0.122.0

All returns an iterator over index-value pairs in the slice.

for i, v := range es.All() {
    ... // Do something with index-value pair
}

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 Stack added in v0.136.0

type Stack 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 NewStack function to create new instances. Important: zero-initialized instance is not valid for use.

func NewStack added in v0.136.0

func NewStack() Stack

NewStack creates a new empty Stack.

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 (Stack) CopyTo added in v0.136.0

func (ms Stack) CopyTo(dest Stack)

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

func (Stack) Equal added in v0.138.0

func (ms Stack) Equal(val Stack) bool

Equal checks equality with another Stack

func (Stack) LocationIndices added in v0.136.0

func (ms Stack) LocationIndices() pcommon.Int32Slice

LocationIndices returns the LocationIndices associated with this Stack.

func (Stack) MoveTo added in v0.136.0

func (ms Stack) MoveTo(dest Stack)

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

type StackSlice added in v0.136.0

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

StackSlice logically represents a slice of Stack.

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

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

func NewStackSlice added in v0.136.0

func NewStackSlice() StackSlice

NewStackSlice creates a StackSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.

func (StackSlice) All added in v0.136.0

func (es StackSlice) All() iter.Seq2[int, Stack]

All returns an iterator over index-value pairs in the slice.

for i, v := range es.All() {
    ... // Do something with index-value pair
}

func (StackSlice) AppendEmpty added in v0.136.0

func (es StackSlice) AppendEmpty() Stack

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

func (StackSlice) At added in v0.136.0

func (es StackSlice) At(i int) Stack

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 (StackSlice) CopyTo added in v0.136.0

func (es StackSlice) CopyTo(dest StackSlice)

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

func (StackSlice) EnsureCapacity added in v0.136.0

func (es StackSlice) 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 StackSlice can be initialized:

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

func (StackSlice) Len added in v0.136.0

func (es StackSlice) Len() int

Len returns the number of elements in the slice.

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

func (StackSlice) MoveAndAppendTo added in v0.136.0

func (es StackSlice) MoveAndAppendTo(dest StackSlice)

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

func (StackSlice) RemoveIf added in v0.136.0

func (es StackSlice) RemoveIf(f func(Stack) bool)

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

func (StackSlice) Sort added in v0.136.0

func (es StackSlice) Sort(less func(a, b Stack) bool)

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

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() 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 AggregationTemporality)

SetAggregationTemporality replaces the aggregationtemporality associated with this ValueType.

func (ValueType) SetTypeStrindex added in v0.115.0

func (ms ValueType) SetTypeStrindex(v int32)

SetTypeStrindex replaces the typestrindex associated with this ValueType.

func (ValueType) SetUnitStrindex added in v0.115.0

func (ms ValueType) SetUnitStrindex(v int32)

SetUnitStrindex replaces the unitstrindex associated with this ValueType.

func (ValueType) TypeStrindex added in v0.115.0

func (ms ValueType) TypeStrindex() int32

TypeStrindex returns the typestrindex associated with this ValueType.

func (ValueType) UnitStrindex added in v0.115.0

func (ms ValueType) UnitStrindex() int32

UnitStrindex returns the unitstrindex 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) All added in v0.122.0

func (es ValueTypeSlice) All() iter.Seq2[int, ValueType]

All returns an iterator over index-value pairs in the slice.

for i, v := range es.All() {
    ... // Do something with index-value pair
}

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