Class ThreadInfoEventCodec
Wire codec for ThreadInfo. Layout after the 12-byte common header:
offset 12..15 i32 ManagedThreadId
offset 16..17 u16 NameByteCount
offset 18+ byte[NameByteCount] NameUtf8
offset 18+N u8 ThreadKind
Total wire size: 12 + 4 + 2 + NameByteCount + 1 bytes.
public static class ThreadInfoEventCodec
- Inheritance
-
ThreadInfoEventCodec
- Inherited Members
Methods
ComputeSize(int)
Total wire size in bytes of a ThreadInfo record whose name is nameByteCount UTF-8 bytes.
public static int ComputeSize(int nameByteCount)
Parameters
nameByteCountint
Returns
Decode(ReadOnlyMemory<byte>)
Decode a ThreadInfo record from source.
public static ThreadInfoEventData Decode(ReadOnlyMemory<byte> source)
Parameters
sourceReadOnlyMemory<byte>
Returns
WriteThreadInfo(Span<byte>, byte, long, int, ReadOnlySpan<byte>, ThreadKind, out int)
Encode a ThreadInfo record. Caller has pre-computed nameUtf8 (via UTF8).
public static void WriteThreadInfo(Span<byte> destination, byte threadSlot, long timestamp, int managedThreadId, ReadOnlySpan<byte> nameUtf8, ThreadKind kind, out int bytesWritten)
Parameters
destinationSpan<byte>threadSlotbytetimestamplongmanagedThreadIdintnameUtf8ReadOnlySpan<byte>kindThreadKindbytesWrittenint