Table of Contents

Class LiveStreamProtocol

Namespace
Typhon.Profiler
Assembly
Typhon.Profiler.dll

Frame envelope for the Tracy-style profiler's live TCP stream. Each frame: [u8 type][u32 length][payload length bytes].

public static class LiveStreamProtocol
Inheritance
LiveStreamProtocol
Inherited Members

Remarks

The live stream carries the same content as the file format but delivered incrementally: Init sends the file header + metadata tables, Block sends one compressed record block per consumer drain, Shutdown signals end-of-session.

Fields

FrameHeaderSize

Size of the frame header in bytes: 1 (type) + 4 (length) = 5.

public const int FrameHeaderSize = 5

Field Value

int

Methods

ReadFrameHeader(ReadOnlySpan<byte>)

Read a frame header from source.

public static (LiveFrameType Type, int PayloadLength) ReadFrameHeader(ReadOnlySpan<byte> source)

Parameters

source ReadOnlySpan<byte>

Returns

(LiveFrameType Type, int PayloadLength)

WriteFrameHeader(Span<byte>, LiveFrameType, int)

Write a frame header into destination.

public static void WriteFrameHeader(Span<byte> destination, LiveFrameType type, int payloadLength)

Parameters

destination Span<byte>
type LiveFrameType
payloadLength int