Table of Contents

Class TraceRecordBatch

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

A pooled, refcounted batch of raw trace records passed from the consumer drain loop to one or more exporters. Replaces the Phase 1/2 TraceEventBatch (which held a fixed TraceEvent[]) with a variable-size byte payload plus an offsets index for record walking.

public sealed class TraceRecordBatch
Inheritance
TraceRecordBatch
Inherited Members

Remarks

Layout: the consumer drain pass copies a run of size-prefixed records into Payload, building Offsets alongside so the per-exporter loop can parse records without re-walking size fields. PayloadBytes is the number of valid bytes in Payload; Count is the number of records in the batch.

Lifecycle: rented from Typhon.Engine.Internals.TraceRecordBatchPool by the consumer thread on every drain pass with a refcount equal to the number of exporters that will receive it. Each exporter calls Typhon.Engine.TraceRecordBatch.Release after processing; the last release returns the batch to the pool.

Fields

Offsets

Record-start offsets into Payload. Exporters read this; never write.

public readonly int[] Offsets

Field Value

int[]

Payload

Backing byte buffer — capacity fixed at Typhon.Engine.Internals.TraceRecordBatchPool.MaxPayloadBytes. Exporters read this; never write.

public readonly byte[] Payload

Field Value

byte[]

Properties

Count

Number of records in the batch (valid entries in Offsets).

public int Count { get; }

Property Value

int

PayloadBytes

Number of valid bytes in Payload.

public int PayloadBytes { get; }

Property Value

int