Table of Contents

Class RuntimeEventCodec

Namespace
Typhon.Profiler
Assembly
Typhon.Profiler.dll

Wire codec for Runtime events (kinds 161-164).

public static class RuntimeEventCodec
Inheritance
RuntimeEventCodec
Inherited Members

Fields

UoWCreateSize

Fixed wire size in bytes of a UoWCreate record (common header + 8-byte tick).

public const int UoWCreateSize = 20

Field Value

int

UoWFlushSize

Fixed wire size in bytes of a UoWFlush record (common header + tick + changeCount).

public const int UoWFlushSize = 24

Field Value

int

Methods

ComputeSizeLifecycle(bool)

Wire size in bytes of a Transaction-Lifecycle span, including the 16-byte trace context when hasTraceContext is true.

public static int ComputeSizeLifecycle(bool hasTraceContext)

Parameters

hasTraceContext bool

Returns

int

ComputeSizeOutputExecute(bool)

Wire size in bytes of a Subscription-Output-Execute span, including the trace context when hasTraceContext is true.

public static int ComputeSizeOutputExecute(bool hasTraceContext)

Parameters

hasTraceContext bool

Returns

int

DecodeLifecycle(ReadOnlySpan<byte>)

Decode a Transaction-Lifecycle span from source.

public static RuntimeTransactionLifecycleData DecodeLifecycle(ReadOnlySpan<byte> source)

Parameters

source ReadOnlySpan<byte>

Returns

RuntimeTransactionLifecycleData

The decoded RuntimeTransactionLifecycleData.

DecodeOutputExecute(ReadOnlySpan<byte>)

Decode a Subscription-Output-Execute span from source.

public static RuntimeSubscriptionOutputExecuteData DecodeOutputExecute(ReadOnlySpan<byte> source)

Parameters

source ReadOnlySpan<byte>

Returns

RuntimeSubscriptionOutputExecuteData

The decoded RuntimeSubscriptionOutputExecuteData.

DecodeUoWCreate(ReadOnlySpan<byte>)

Decode a UoWCreate instant from source.

public static RuntimePhaseUoWCreateData DecodeUoWCreate(ReadOnlySpan<byte> source)

Parameters

source ReadOnlySpan<byte>

Returns

RuntimePhaseUoWCreateData

The decoded RuntimePhaseUoWCreateData.

DecodeUoWFlush(ReadOnlySpan<byte>)

Decode a UoWFlush instant from source.

public static RuntimePhaseUoWFlushData DecodeUoWFlush(ReadOnlySpan<byte> source)

Parameters

source ReadOnlySpan<byte>

Returns

RuntimePhaseUoWFlushData

The decoded RuntimePhaseUoWFlushData.

EncodeLifecycle(Span<byte>, long, byte, long, ulong, ulong, ulong, ulong, ushort, uint, byte, out int)

Encode a Transaction-Lifecycle span into destination. Emits the optional 16-byte trace context when traceIdHi or traceIdLo is nonzero; bytesWritten returns the total record size.

public static void EncodeLifecycle(Span<byte> destination, long endTimestamp, byte threadSlot, long startTimestamp, ulong spanId, ulong parentSpanId, ulong traceIdHi, ulong traceIdLo, ushort sysIdx, uint txDurUs, byte success, out int bytesWritten)

Parameters

destination Span<byte>
endTimestamp long
threadSlot byte
startTimestamp long
spanId ulong
parentSpanId ulong
traceIdHi ulong
traceIdLo ulong
sysIdx ushort
txDurUs uint
success byte
bytesWritten int

WriteUoWCreate(Span<byte>, byte, long, long)

Encode a UoWCreate instant into destination (must be at least UoWCreateSize bytes).

public static void WriteUoWCreate(Span<byte> destination, byte threadSlot, long timestamp, long tick)

Parameters

destination Span<byte>
threadSlot byte
timestamp long
tick long

WriteUoWFlush(Span<byte>, byte, long, long, int)

Encode a UoWFlush instant into destination (must be at least UoWFlushSize bytes).

public static void WriteUoWFlush(Span<byte> destination, byte threadSlot, long timestamp, long tick, int changeCount)

Parameters

destination Span<byte>
threadSlot byte
timestamp long
tick long
changeCount int