Documentation ¶
Index ¶
- Constants
- Variables
- type Blob
- type BlobBlock
- type BlobBlockHeader
- type BlobHeader
- type Decoder
- type Metadata
- type MetadataField
- type MetadataHeader
- type MetadataPayload
- type MetadataVersion
- type Object
- type ObjectType
- type Parser
- type SequencePointBlock
- type Stack
- type StackBlock
- type Stream
- type Tag
- type Thread
- type Trace
Constants ¶
View Source
const Version int32 = 4
Variables ¶
View Source
var ( ErrInvalidNetTraceHeader = errors.New("invalid NetTrace header") ErrUnsupportedObjectVersion = errors.New("unsupported object version") ErrInvalidObjectType = errors.New("invalid object type") ErrUnexpectedObjectType = errors.New("unexpected object type") ErrUnexpectedTag = errors.New("unexpected tag") )
View Source
var ErrNotImplemented = errors.New("not implemented")
Functions ¶
This section is empty.
Types ¶
type Blob ¶
type Blob struct { Header BlobHeader // Payload contains Event and Metadata records. Payload *bytes.Buffer // contains filtered or unexported fields }
type BlobBlock ¶
type BlobBlock struct { Header BlobBlockHeader // Payload contains Blobs - serialized fragments which represent // actual events and metadata records. Payload *bytes.Buffer // contains filtered or unexported fields }
BlobBlock contains a set of Blobs.
func BlobBlockFromObject ¶
func (*BlobBlock) IsCompressed ¶
type BlobBlockHeader ¶
type BlobHeader ¶
type BlobHeader struct { MetadataID int32 SequenceNumber int32 ThreadID int64 CaptureThreadID int64 CaptureProcNumber int32 StackID int32 TimeStamp int64 ActivityID [16]byte RelatedActivityID [16]byte PayloadSize int32 // contains filtered or unexported fields }
BlobHeader used for both compressed and uncompressed blobs.
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
type Metadata ¶
type Metadata struct { Header MetadataHeader Payload MetadataPayload // contains filtered or unexported fields }
func MetadataFromBlob ¶
type MetadataField ¶
type MetadataField struct { TypeCode typecode.TypeCode // ArrayTypeCode is an optional field only appears when TypeCode is Array. ArrayTypeCode typecode.TypeCode // For primitive types and strings Payload is not present, however if TypeCode is Object (1) // then Payload is another payload description (that is a field count, followed by a list of // field definitions). These can be nested to arbitrary depth. Payload MetadataPayload Name string }
type MetadataHeader ¶
type MetadataPayload ¶
type MetadataPayload struct {
Fields []MetadataField
}
type MetadataVersion ¶
type MetadataVersion int32
const ( MetadataLegacyV1 MetadataVersion // Used by NetPerf version 1 MetadataLegacyV2 // Used by NetPerf version 2 MetadataNetTrace // Used by NetPerf (version 3) and NetTrace (version 4+) )
type Object ¶
type Object struct { Type ObjectType Version int32 MinimumReaderVersion int32 Payload *bytes.Buffer }
type ObjectType ¶
type ObjectType string
const ( ObjectTypeTrace ObjectType = "Trace" ObjectTypeEventBlock ObjectType = "EventBlock" ObjectTypeMetadataBlock ObjectType = "MetadataBlock" ObjectTypeStackBlock ObjectType = "StackBlock" ObjectTypeSPBlock ObjectType = "SPBlock" )
func (ObjectType) IsValid ¶
func (t ObjectType) IsValid() bool
type Parser ¶
type SequencePointBlock ¶
func SequencePointBlockFromObject ¶
func SequencePointBlockFromObject(o Object) (*SequencePointBlock, error)
type Stack ¶
func (Stack) InstructionPointers ¶ added in v1.0.1
type StackBlock ¶
type StackBlock struct {
Stacks []Stack
}
func StackBlockFromObject ¶
func StackBlockFromObject(o Object) (*StackBlock, error)
type Stream ¶
type Stream struct { EventHandler func(*Blob) error MetadataHandler func(*Metadata) error StackBlockHandler func(*StackBlock) error SequencePointBlockHandler func(*SequencePointBlock) error // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.