pprofile

package module
v0.117.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 13 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

func (ms AttributeUnit) AttributeKeyStrindex() int32

AttributeKeyStrindex returns the attributekeystrindex 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) SetAttributeKeyStrindex added in v0.115.0

func (ms AttributeUnit) SetAttributeKeyStrindex(v int32)

SetAttributeKeyStrindex replaces the attributekeystrindex associated with this AttributeUnit.

func (AttributeUnit) SetUnitStrindex added in v0.115.0

func (ms AttributeUnit) SetUnitStrindex(v int32)

SetUnitStrindex replaces the unitstrindex associated with this AttributeUnit.

func (AttributeUnit) UnitStrindex added in v0.115.0

func (ms AttributeUnit) UnitStrindex() int32

UnitStrindex returns the unitstrindex 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) 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) 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 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() 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) 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) 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) HasMappingIndex added in v0.115.0

func (ms Location) HasMappingIndex() bool

HasMappingIndex returns true if the Location contains a MappingIndex value, false otherwise.

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

func (ms Location) RemoveMappingIndex()

RemoveMappingIndex removes the mappingindex associated with this Location.

func (Location) SetAddress

func (ms Location) SetAddress(v uint64)

SetAddress replaces the address 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 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 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) 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) 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) 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) 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) 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) 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) AttributeIndices added in v0.117.0

func (ms Profile) AttributeIndices() pcommon.Int32Slice

AttributeIndices returns the AttributeIndices associated with this Profile.

func (Profile) AttributeTable

func (ms Profile) AttributeTable() AttributeTableSlice

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

func (ms Profile) DefaultSampleTypeStrindex() int32

DefaultSampleTypeStrindex returns the defaultsampletypestrindex associated with this Profile.

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

func (ms Profile) FunctionTable() FunctionSlice

FunctionTable returns the FunctionTable associated with this Profile.

func (Profile) LinkTable

func (ms Profile) LinkTable() LinkSlice

LinkTable returns the LinkTable associated with this Profile.

func (Profile) LocationIndices

func (ms Profile) LocationIndices() pcommon.Int32Slice

LocationIndices returns the LocationIndices associated with this Profile.

func (Profile) LocationTable added in v0.115.0

func (ms Profile) LocationTable() LocationSlice

LocationTable returns the LocationTable associated with this Profile.

func (Profile) MappingTable added in v0.115.0

func (ms Profile) MappingTable() MappingSlice

MappingTable returns the MappingTable 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() ValueTypeSlice

SampleType returns the SampleType associated with this Profile.

func (Profile) SetDefaultSampleTypeStrindex added in v0.115.0

func (ms Profile) SetDefaultSampleTypeStrindex(v int32)

SetDefaultSampleTypeStrindex replaces the defaultsampletypestrindex 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) SetStartTime

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

SetStartTime replaces the starttime 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) 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.

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.

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

func (ms Sample) LocationsLength() int32

LocationsLength returns the locationslength associated with this Sample.

func (Sample) LocationsStartIndex

func (ms Sample) LocationsStartIndex() int32

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 (Sample) SetLocationsLength

func (ms Sample) SetLocationsLength(v int32)

SetLocationsLength replaces the locationslength associated with this Sample.

func (Sample) SetLocationsStartIndex

func (ms Sample) SetLocationsStartIndex(v int32)

SetLocationsStartIndex replaces the locationsstartindex 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() 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) 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) 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) 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