Class RuntimeEventCodec
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
UoWFlushSize
Fixed wire size in bytes of a UoWFlush record (common header + tick + changeCount).
public const int UoWFlushSize = 24
Field Value
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
hasTraceContextbool
Returns
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
hasTraceContextbool
Returns
DecodeLifecycle(ReadOnlySpan<byte>)
Decode a Transaction-Lifecycle span from source.
public static RuntimeTransactionLifecycleData DecodeLifecycle(ReadOnlySpan<byte> source)
Parameters
sourceReadOnlySpan<byte>
Returns
DecodeOutputExecute(ReadOnlySpan<byte>)
Decode a Subscription-Output-Execute span from source.
public static RuntimeSubscriptionOutputExecuteData DecodeOutputExecute(ReadOnlySpan<byte> source)
Parameters
sourceReadOnlySpan<byte>
Returns
DecodeUoWCreate(ReadOnlySpan<byte>)
Decode a UoWCreate instant from source.
public static RuntimePhaseUoWCreateData DecodeUoWCreate(ReadOnlySpan<byte> source)
Parameters
sourceReadOnlySpan<byte>
Returns
- RuntimePhaseUoWCreateData
The decoded RuntimePhaseUoWCreateData.
DecodeUoWFlush(ReadOnlySpan<byte>)
Decode a UoWFlush instant from source.
public static RuntimePhaseUoWFlushData DecodeUoWFlush(ReadOnlySpan<byte> source)
Parameters
sourceReadOnlySpan<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
destinationSpan<byte>endTimestamplongthreadSlotbytestartTimestamplongspanIdulongparentSpanIdulongtraceIdHiulongtraceIdLoulongsysIdxushorttxDurUsuintsuccessbytebytesWrittenint
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
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)